Skip to content
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

Fixing regression where RD2 Change Type is not set without value change #6924

Closed
wants to merge 3 commits into from

Conversation

lparrott
Copy link
Contributor

Critical Changes

Changes

Issues Closed

Community Ideas Delivered

Features Intended for Future Release

Features for Elevate Customers

New Metadata

Deleted Metadata

@@ -134,7 +135,7 @@ const getDonationValue = (state) => {

const getChangeType = (state) => {
if (isRecurringTypeChanged(state) || isNewRecord(state)) {
return "";
return state.changeType;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing this allows a manual change to the picklist to "stick" even if the overall Value changed, which is in line with our current release.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the only thing that needs to change in this PR. I believe that an empty string is the correct return value for when the recurring type is changed or when the record is new. There's one test that fails if we return state.changeType:

open donation, when amount changed and recurring type changed to fixed, blanks change type picklist

I've added a test for manual changes sticking in commit 6b99fdf called "open donation, persists manual change to change type picklist".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, I thought about this last night after you reached out, I'll make the change and do a bit more testing!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just pushed a fix, thanks for adding that Jest test 👍

@lparrott
Copy link
Contributor Author

Added to #6928

@lparrott lparrott closed this Apr 14, 2022
@lparrott lparrott deleted the feature/999__rdChangeTypeFix branch June 29, 2022 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants