Yes I'm just thinking over the approach. I also wanted to look if this creates permission problems for noncase activities too if it's checking against label instead of name.
My plan is to leave $this->_activityTypeName alone and just document that it is really label, and then in the places where it really should be name use a new variable $activityTypeInternalLookupName. A quick look through the code suggests that in many places activityTypeName is being used as a label (correctly), and so that's why I'm thinking to leave it alone despite the misnomer (or mislabler ?). Also, since activityTypeName is a form member and something that people might be referencing in form hooks, it makes me more hesitant to touch it.
Something else to consider when making this change.
The name (not label) is being used in the Case Type Activity List, instead of the label. Clients have complained when they change the label for the activity type, it isn't reflected properly in case activity type list. The AJAX shows the different values coming out, but the interface is using the name value and not the label.
{"id":"2522","option_group_id":"2","label":"Family Capacity Building (Individual/Family Contact)","value":"78","name":"Individual/family session",`
I understand the name needs to stay the same for stability/compatibility/hooks/XLM files... However the label should be used consistently across the GUI, as it is confusing to the end user. The user really doesn't care what the name is, as long as the interface shows the label correctly.
FYI - I got bitten by this bug as well (in a non-case environtment): when viewing an activity, the template adds line breaks if it's an inbound email. However, if the user changes the label for inbound email, it fails.
This looks good to met @DaveD - I wasn't able to test with data from the group that was affected (still on 5.13 and the initial commit - f692bf33 - has a load of conflicts). But the code looks solid and is quite simple and has a test.
I don't quite understand the jenkins error, but it doesn't seem to be related to your code or test.
Thanks @jamie. I think the test fail is related in that the added test is affecting some global form state that carries over between tests. I'll have to take a look.
Thank you for raising an issue to help improve CiviCRM. As you may know, this issue has not had any activity for quite some time, so we have closed it.
We would like you to help us to determine if this issue should be re-opened:
If this issue was reporting a bug, can you attempt to reproduce it on a latest version of CiviCRM?
If this issue was proposing a new feature, can you verify if the feature proposal is still relevant? Did it get the concept-approved label? Have other people also shown interest? Could it be implemented as an extension?
If the answer to either question is yes, please feel free to comment or re-open the issue. Please also consider:
Is it something that you could help implement, either by sending a patch or hiring someone who can?
Thank you for your help and contributions to CiviCRM.
P.S. This is an automated message, see infra/gitlab issue 20. We understand that automatic responses are annoying, but given the number of open issues as the project evolves, we need a bit of help to triage and prioritise the most relevant issues.
Thank you for raising an issue to help improve CiviCRM. As you may know, this issue has not had any activity for quite some time, so we have closed it.
We would like you to help us to determine if this issue should be re-opened:
If this issue was reporting a bug, can you attempt to reproduce it on a latest version of CiviCRM?
If this issue was proposing a new feature, can you verify if the feature proposal is still relevant? Did it get the concept-approved label? Have other people also shown interest? Could it be implemented as an extension?
If the answer to either question is yes, please feel free to comment or re-open the issue. Please also consider:
Is it something that you could help implement, either by sending a patch or hiring someone who can?
Thank you for your help and contributions to CiviCRM.
P.S. This is an automated message, see infra/gitlab issue 20. We understand that automatic responses are annoying, but given the number of open issues as the project evolves, we need a bit of help to triage and prioritise the most relevant issues.