CRM-19754 CiviCase role relationships reversed -- Case UI and Send Copy label change #9975
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://issues.civicrm.org/jira/browse/CRM-19754
see Lisa Taliano's comments
Thanks for this fix. There are still a few problems with labels.
In the Case UI, the Roles drop-down, it shows only the labels in the opposite direction.
so for example, one can only pick "Case Manager for". I should be able to pick "Case Manager is".
This causes a problem when Case is initially opened, if role hasen't been assigned, the label is wrong. note: if you actually assign role, it is in the correct direction and the label changes.
Also in Case Activity "Send a copy" the role is correct but the label is wrong. It list the Case Manager, as "Case Manager is" instead of "Case Manager for", even when the direction and label is correct.
To fix Case UI must change the following files
CRM/Case/XMLProcessor.php
line 59 const REL_TYPE_CNAME = 'label_a_b';
civicrm/ang/crmCaseType.js
line 139 return
{id: type[REL_TYPE_CNAME], text: type.label_a_b}
;
To fix "Send a copy" must change:
Case/BAO/Case.php
line 1217 SELECT cc.display_name as name, cc.sort_name as sort_name, cc.id, crt.label_a_b as role, ce.email
in each case you must change the direction from b_a to a_b