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

W-17216147 - 'First installment paid' checkbox not being set to true in Gift Entry #7266

Conversation

salesforce-suyash-more
Copy link
Contributor

Critical Changes

Changes

GUS : W-17216147

Modified files :

  • geBatchWizard.js
  • GiftBatch.cls

Issues Closed

Community Ideas Delivered

Features Intended for Future Release

Features for Elevate Customers

New Metadata

Deleted Metadata

Replaced hard-coded fieldname with label for 'First installment paid' checkbox, since batch-Defaults contains field labels as keys
@@ -47,7 +47,7 @@ public inherited sharing class GiftBatch implements IGiftBatch {
private GiftTemplate giftTemplate;

private Boolean shouldPayFirstInstallment = false;
private static final String AllowFirstInstallmentPaid = 'AllowFirstInstallment__f';
private static final String AllowFirstInstallmentPaid = 'First installment paid';
Copy link
Contributor

Choose a reason for hiding this comment

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

@salesforce-suyash-more Will this break when the User is set to a non-English language? It looks like the geRD2FirstInstallmentPaid Label has translations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lparrott, your doubt about the translation issue was wise. I've made changes to ensure the FirstInstallmentPaid label is translation-compatible. Please review the latest updates.

Copy link
Contributor

Choose a reason for hiding this comment

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

@salesforce-suyash-more Unfortunately this still won't work in an multi-language org since the Template (in Batch_Defaults__c) gets stored in the running User's language, and then it would potentially get read back as a different language. Is there a reason the Batch_Defaults__c use field Labels and not API names as the key values? That seems to be the issue, did we change that in the past release?

Copy link
Contributor Author

@salesforce-suyash-more salesforce-suyash-more Dec 5, 2024

Choose a reason for hiding this comment

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

Hi @lparrott , Let's consider a scenario where a user using the English language creates a Gift Batch, which stores the 'First installment paid' English label in 'Batch_Defaults'. However, when a user from a different language (e.g. German) accesses the same Gift Batch and edits the 'Batch Info', the translated label will be updated in 'Batch_Defaults'.

The reason for using field labels in 'Batch_Defaults__c' stems from the bug fix related to W-14308598. This bug required replacing API names with field labels to distinguish between the ‘GAU Allocation 1’ and ‘GAU Allocation 2’ object group fields in the gift entry template. Since both object groups will have the same API names, it caused an issue of overriding form field values while setting defaults.
please refer to the Quip document for details of that bug.

Copy link
Contributor

Choose a reason for hiding this comment

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

@salesforce-suyash-more Thanks for that info, I forgot about that bug fix.
Are you saying the scenario you mentioned will work? That was my concern, an English User creates the Batch which stores the Labels as English, then a German User accesses it and our logic fails because it won't find the German translation of "geRD2FirstInstallmentPaid".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, @lparrott. The German user won't see the translated label in Batch_Defaults until they make an update in 'Batch Info'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lparrott, I made some changes to the logic for populating the Batch_Defaults, ensuring that the fieldApiName for the 'First installment paid' checkbox is stored in Batch_Defaults to resolve the translation issues with the labels.

@lparrott lparrott self-requested a review November 19, 2024 17:19
Base automatically changed from feature/254 to main November 25, 2024 22:03
@lparrott lparrott changed the base branch from main to feature/256 December 4, 2024 20:37
Copy link
Contributor

@lparrott lparrott left a comment

Choose a reason for hiding this comment

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

Looks good!

@daniel-fuller daniel-fuller changed the base branch from feature/256 to main December 9, 2024 14:14
…47-First-installment-paid-value-not-update-in-GE-Batch-Info
@lparrott lparrott merged commit a8a24c7 into main Dec 9, 2024
5 of 9 checks passed
@lparrott lparrott deleted the feature/254__W-17216147-First-installment-paid-value-not-update-in-GE-Batch-Info branch December 9, 2024 23:02
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.

2 participants