-
-
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
Restore civicrm_action_schedule.limit_to
(5.49)
#23490
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm not sure what it even means to limit a scheduled-reminder to a "soft_credit_type". But it's a thing - I can use the 5.48 GUI to create it. Here's how it looks in the DB (in 5.48): +----+------------------------------------------+------------------+----------+------------------+-------------------+----------+ | id | title | recipient | limit_to | recipient_manual | recipient_listing | group_id | +----+------------------------------------------+------------------+----------+------------------+-------------------+----------+ | 11 | Limit To - Soft Credit | soft_credit_type | 1 | NULL | in_memory_of | NULL | +----+------------------------------------------+------------------+----------+------------------+-------------------+----------+ The `changeBooleanColumnLimitTo()` was coercing down to `limit_to=null` because it lacked `recipient_manual` and `group_id`.
(Standard links)
|
@totten please merge this when you are ready as it represents a reviewer commit / agreed messaging |
1. This fixes a problem where the message shows at the opposite-of-correct time (ie it should display on builds that have already run 5.49.{beta,0,1}, but it actually displayed on builds that have not run 5.49.{beta,0,1}) 2. This makes the pre+post messages match.
This was referenced May 19, 2022
monishdeb
reviewed
May 19, 2022
} | ||
|
||
public function createLimitToMessage(): ?string { | ||
$suspectRecords = CRM_Core_DAO::singleValueQuery("SELECT GROUP_CONCAT(id SEPARATOR \", #\") FROM civicrm_action_schedule WHERE limit_to=0 AND (recipient_manual IS NOT NULL OR group_id IS NOT NULL)"); |
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.
nice formatted ids :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
(Updated variant of @monishdeb's #23477. Equivalent to #23497 on 5.50-rc)
Restore the schema for field
civicrm_action_schedule.limit_to
to allowNULL
values. Attempt to reinstateNULL
values (where possible). Warn about any records which may have changed.See also:
Before
limit_to
is not nullablelimit_to
cannot be saved withnull
5.48.2 ==> 5.49.1
) will munge data; it coerces fromlimit_to=null
to0
.After
limit_to
is nullable (as in <=5.48)limit_to
can be saved withnull
5.48.2 ==> 5.49.2
, it properly preserves data.5.48.2 ==> 5.49.1 ==> 5.49.2
, then the first upgrade already munged data. The second upgrade remediates by:limit_to=0 AND group_id=NULL AND recipient_manual=NULL
)limit_to=0
even though their 5.48