-
-
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
CRM-20913 - Add separate option group for pledge status #10737
Conversation
CRM/Pledge/BAO/Query.php
Outdated
@@ -405,7 +405,7 @@ public static function from($name, $mode, $side) { | |||
break; | |||
|
|||
case 'pledge_status': | |||
$from .= " $side JOIN civicrm_option_group option_group_pledge_status ON (option_group_pledge_status.name = 'contribution_status')"; | |||
$from .= " $side JOIN civicrm_option_group option_group_pledge_status ON (option_group_pledge_status.name = {$name})"; |
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.
Does using $name add anything here - seems it would always be that
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.
$name
is always pledge_status
. But, just for readability, I'll update this to text instead of variable.
Not having tested it either, the code looks about right - looks like Jenkins has been busy testing it :-) |
8b0d660
to
035788c
Compare
035788c
to
dc0f890
Compare
Added unit test for
To-do - Test Upgrade code to assert whether new option group gets created after upgradation. |
Tested and confirmed |
@monishdeb if you are able to take a look at this it should simplify some of the other contribution things |
Note: I haven't yet pushed the generated data changes, as PR is more likely to get stale due to them. |
Tested the PR, working as expected. @jitendrapurohit can you add the generated data changes. So I could merge then? |
Done @monishdeb 👍 |
Tested all the five scenarios/fixes mentioned above #10737 (comment) . Working fine as expected |
(@option_group_id_ps, '{ts escape="sql"}Pending{/ts}' , 2, 'Pending' , NULL, 0, NULL, 2, NULL, 0, 1, 1, NULL, NULL, NULL), | ||
(@option_group_id_ps, '{ts escape="sql"}Cancelled{/ts}' , 3, 'Cancelled' , NULL, 0, NULL, 3, NULL, 0, 1, 1, NULL, NULL, NULL), | ||
(@option_group_id_ps, '{ts escape="sql"}In Progress{/ts}', 4, 'In Progress', NULL, 0, NULL, 4, NULL, 0, 1, 1, NULL, NULL, NULL), | ||
(@option_group_id_ps, '{ts escape="sql"}Overdue{/ts}' , 5, 'Overdue' , NULL, 0, NULL, 5, NULL, 0, 1, 1, NULL, NULL, 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.
@jitendrapurohit @eileenmcnaughton I forgot to mention, do we need to delete In Progress
and Overdue
status from Contribution Status's option values too?
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.
These are pledge status where In Progress
and Overdue
status are required. I haven't removed any existing status in this PR. See point 2 in first comment where I initially removed Inprogress
from contribution status but it looks like some unit test do want to set this status for recur contribution - Eg. - ContributionTest and ContributionPageTest.
Well done guys - I think @jitendrapurohit said 'In Progress' is needed for contribution recur (which suggests to me it should have it's own set too) |
Tagging as wip since I haven't yet performed any initial testing for this or written any unit test..
Failed
,Chargeback
,Pending Refund
,Partially paid
andRefunded
.Remove- reverted this asIn Progress
value from contribution status.In Progress
gets set for recurring contribution.Comments welcome @eileenmcnaughton