-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When creating relationship types don't munge names #14216
Conversation
(Standard links)
|
This was tested alongside #13916, with both patches applied. |
I dug a little & still think this was done on a 'this seems like better practice' rather than a real reason so I'm happy to merge this reversal. However, I would note that if #13916 relies on labels always matching names that could be a problem since a) the data model doesn't require it & b) any types saved 'recently' will be different |
@eileenmcnaughton no #13916 doesn't require this--it just highlighted it as a potential oddity. Once @alifrumin and I were done with it, case types still use labels and only labels. |
@eileenmcnaughton It's broken currently anyway in that label always has to match name. You can't change the label of a case role currently in civi without problems. |
I mean it's fine if they're different when created, but then you can't ever change it. |
@demeritcowboy @agh1 ok cool - well it does seem like merging this will save future confusion |
@demeritcowboy doesn't the wrapping in if (empty($params['id'])) mean it still won't change? |
Give me a minute to write this out in english properly... |
Ok I tried to shorten it to remove the rambling which I tend to do. How does this sound: Current situation, without either PR: After 13916: |
Or yeah I might be wrong about the AFTER part, in which case oops 13916 doesn't rely on this. Having said that, once this was put up as a PR I did my testing with both applied locally. |
Overview
as @agh1 points out here this change #12097 made on May 8, 2018 made it so relationship types names get munged. This change reverts back to not munging relationship type names.
Before
Creating a Relationship type for example:
Results in the Relationship type names being munged see
name_a_b
andname_b_a
below:After
When creating a Relationship type names are not munged see
name_a_b
andname_b_a
in the example below: