Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
da5c41f1
Commit
da5c41f1
authored
3 years ago
by
Eileen McNaughton
Browse files
Options
Downloads
Patches
Plain Diff
#2895
handle case ids passed via url
parent
bfeae56b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Case/Form/Task.php
+9
-0
9 additions, 0 deletions
CRM/Case/Form/Task.php
CRM/Case/Form/Task/Email.php
+15
-6
15 additions, 6 deletions
CRM/Case/Form/Task/Email.php
with
24 additions
and
6 deletions
CRM/Case/Form/Task.php
+
9
−
0
View file @
da5c41f1
...
...
@@ -114,4 +114,13 @@ class CRM_Case_Form_Task extends CRM_Core_Form_Task {
);
}
/**
* Get the token processor schema required to list any tokens for this task.
*
* @return array
*/
protected
function
getTokenSchema
():
array
{
return
[
'contactId'
,
'caseId'
];
}
}
This diff is collapsed.
Click to expand it.
CRM/Case/Form/Task/Email.php
+
15
−
6
View file @
da5c41f1
...
...
@@ -33,6 +33,11 @@ class CRM_Case_Form_Task_Email extends CRM_Case_Form_Task {
/**
* List available tokens for this form.
*
* @todo - this is not standard behaviour. We should either stop filtering
* case tokens by type and just remove this function (which would allow
* domain tokens to show up too) or
* resolve https://lab.civicrm.org/dev/core/-/issues/2788
*
* @return array
* @throws \CRM_Core_Exception
*/
...
...
@@ -70,14 +75,18 @@ class CRM_Case_Form_Task_Email extends CRM_Case_Form_Task {
* Get the result rows to email.
*
* @return array
*
* @throws \CRM_Core_Exception
*/
protected
function
getRows
():
array
{
// format contact details array to handle multiple emails from same contact
$rows
=
parent
::
getRows
();
foreach
(
$rows
as
$index
=>
$row
)
{
$rows
[
$index
][
'schema'
][
'caseId'
]
=
$this
->
getCaseID
();
protected
function
getRowsForEmails
():
array
{
$formattedContactDetails
=
[];
foreach
(
$this
->
getEmails
()
as
$details
)
{
$contactID
=
$details
[
'contact_id'
];
$index
=
$contactID
.
'::'
.
$details
[
'email'
];
$formattedContactDetails
[
$index
]
=
$details
;
$formattedContactDetails
[
$index
][
'schema'
]
=
[
'contactId'
=>
$contactID
,
'caseId'
=>
$this
->
getCaseID
()];
}
return
$
row
s
;
return
$
formattedContactDetail
s
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment