-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
event#34: allow negative self-service/transfer time #18067
Conversation
(Standard links)
|
5535949
to
14653e4
Compare
@MegaphoneJon test fails relate (which is more good than bad) CRM_Event_BAO_ParticipantTest::testGetSelfServiceEligibility with data set #1 (1, 12, 8, 1, false, false) /home/jenkins/bknix-dfl/build/core-18067-644q1/web/sites/all/modules/civicrm/CRM/Event/BAO/Participant.php:1933 |
14653e4
to
14b7bf1
Compare
Thanks for the heads-up Eileen! Once I added this patch, I remembered why I made the |
From a code point of view this looks very tidy - @jitendrapurohit any chance you can test? I think you & @MegaphoneJon are the only 2 people who have ever shown any interest in this functionality |
@MegaphoneJon sorry needs another rebase |
A question about that - the DAO doesn't distinguish between It wouldn't avoid this rebase, but it would keep me safe from other DAO changes causing a future rebase, and would be good info to have in any case. |
@MegaphoneJon that appears to be the case.... (@seamuslee001 ) |
14b7bf1
to
a75149c
Compare
@petednz - @jitendrapurohit am hoping I can get Fuzion to review this one.... |
think it missed the above/first ping. I'll review this today. |
thanks @jitendrapurohit - I don't think many other people have looked at this code |
Tested and confirmed that it works fine in calculating the deadline and displaying the appropriate msg on the screen. The msg sent via email looks a bit off -
These are hardcoded in the message templates so would need to be another "upgrade handling" part. Not sure if required though. I had to apply the alter statement from the upgrade file in order to test, but think that will be handled by the regen automatically. Probably we should also extend the help text to document the purpose of negative value? |
event civicrm#34 message improvement fixes to message template fixes
a75149c
to
a54cf42
Compare
Thanks for your review Jitendra, and these were all good catches!
This is fixed now.
This concerned me, so I took a look - this needed a fix, since we're now targeting 5.30 and now 5.29.
This is also fixed. |
@jitendrapurohit good to merge now? |
Thanks for the quick update @MegaphoneJon. I've confirmed that the above points are sorted. Pls merge @eileenmcnaughton. |
Thanks @MegaphoneJon , thanks @jitendrapurohit |
https://lab.civicrm.org/dev/event/-/issues/34
Overview
Events are often multi-day events; e.g. if events represent university courses, and there is a period wherein students may freely cancel their registration in the first week of classes, it's desirable to have the cancel time be negative.
Before
Entering a negative value into "Cancellation or transfer time limit (hours)" results in a DB Error.
After
Entering a negative value into "Cancellation or transfer time limit (hours)" saves correctly and works as expected.
Technical Notes
civicrm_event.selfservicexfer_time
is now anint
and not anunsigned int
.Comments
I regenerated the DAO, but I'm not sure if that's necessary here, because the DAO doesn't differentiate between the unsigned and signed int?