-
-
Notifications
You must be signed in to change notification settings - Fork 812
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
CRM-20787: For a repeating Event series. Changing price set of main event, it should be copied to all repeating events if we select 'Every event' mode. #11161
Conversation
…ice Set for a paid Event then this Price Set selection is not applied to all Events in the series even when apply to Every Event is selected - Added Code for apply same priceset for paid series events
…et of repeating events.
@eileenmcnaughton |
In terms of a unit test I think it makes most sense to extract the guts of the function (everything except the bit which outputs the json) into another function (probably on the BAO class. Probably extract the parameters from the REQUEST in the AJAX function. Then your unit test can test the extracted function & sit in CRM_Core_BAO_RecurringEntityTest & you can test the result without having to bypass the json exit in the function. I terms of this PR my assessment is that the code looks good. I don't feel able to comment on the appropriateness of this change as I don't work with that area of the codebase but @deepak-srivastava @totten or @colemanw might be able to - it's certainly not raising any red flags for me |
@eileenmcnaughton Understood, We will try to write UT for this. |
@eileenmcnaughton |
@eileenmcnaughton I give a +1 for the appropriateness of the change. Personally, I would have blocked merging recurring events at all unless this (and CRM-16902) were present. |
Just a quick note to say I'm happy with this from a code point of view & concept - per @MegaphoneJon. The code concerns I have (by-passing hooks) are pre-existing and this just moves them around. This is good to merge pending someone doing a UI test of it (that might be me but if someone else gets to it first....) |
Can we get this PR merged? @eileenmcnaughton or @seamuslee001 |
I did some UI testing on this & can confirm it works per the description of the PR. With the patch applies I can still alter only one event's price set but I can alter all. Merging per my tests & prior discussion |
Thanks very much @eileenmcnaughton |
Well I thought I'd better make good after Francis reviewed my deadlock PR yesterday :-) |
Hell yeah! @eileenmcnaughton |
:-) |
CRM-20787: For a repeating Event series. Changing price set of main event, it should be copied to all repeating events if we select 'Every event' mode.
Noting that this caused a regression https://issues.civicrm.org/jira/browse/CRM-21764 |
@eileenmcnaughton thanks for the heads up, I've made a note to discuss what we can do here. |
Overview
For a repeating Event series. If we change the Price Set for a paid Event then this Price Set selection is not applied to all Events in the series even when apply to Every Event is selected.
Steps to reproduce:
Before
Updated price set is not applied to the Repeating events which is unexpected behaviour.
After
It now works as expected. Price set is changed for repeating events too.
Agileware Ref CIVICRM-152