-
-
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
Revert civicrm_action_schedule.limit_to boolean column to be NULL #23477
Conversation
(Standard links)
|
@monishdeb we need to merge to the 5.50 rc before we can merge to 5.49 stable - can you put up a PR against the rc too (this will be mergeable once that is merged, if no changes made to that one) |
Created PR for 5.50 rc #23478 |
31304d4
to
1581c76
Compare
@monishdeb I would suggest a second commit based on:
|
done :) ..thanks! |
@monishdeb To try this, I created a 5.48 database with ~10 scheduled-reminders. Each reminder was in a different configuration status, eg
Then I used this DB snapshot with various upgrade paths, eg
The results are here: https://gist.github.com/totten/7f43420108d4e40c4d1aabbda1763f1b A few issues:
|
If limit_to=NULL then group_id should also be set to NULL - to address https://lab.civicrm.org/dev/core/-/issues/3464#note_74627 If the limit_to value is 1 then remove the value of the Group ID field on save of the Scheduled Reminder form. |
b4a4c53
to
60ff732
Compare
@totten thanks for detailed report. I have addressed the first issue by adding an upgrade code for 5.49.0 and 2nd issue by adding pre and post upgrade message. @agileware-justin I will address this bug in the master branch PR #23487 |
60ff732
to
1dcd81f
Compare
1dcd81f
to
ce1ef36
Compare
public function upgrade_5_49_2($rev) { | ||
if (version_compare(CRM_Core_BAO_Domain::version(), '5.49', '>=') { | ||
public function upgrade_5_49_0($rev) { | ||
if (version_compare(CRM_Core_BAO_Domain::version(), '5.49.beta1', '>=')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well... that was worth a try... In my r-run
over each of the upgrade paths, it never seems to return TRUE, so it always skipped the step.
I think I found a hidden feature which can do what this is trying to do... but still putting it through the r-run
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify that a bit...
What this line seems to ask: "Is the start-revision >= 5.49.beta1?" But Domain::version()
doesn't tell you the start-revision. (It tells you the last-stored incremental update, which is a rolling-value during the upgrade process.)
However, the information is available. The upgrade_N_N_N()
method can actually receive three parameters (upgrade_5_49_2($currentRev, $startRev, $finalRev)
). The $startRev
parameter is what this was looking for (aff7086).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, didn't knw that
Replaced by #23490, which starts from similar commits but adds a few more. |
Overview
Revert the boolean field civicrm_action_schedule.limit_to to be NULL and not required, to address issues https://lab.civicrm.org/dev/core/-/issues/3464 and https://lab.civicrm.org/dev/core/-/issues/3465
In my opinion, limit_to should be int with three options.
Comments
ping @agileware-justin @eileenmcnaughton @MegaphoneJon @colemanw