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

T1721 - Generate gift wizard uses the wrong partner #240

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

clementcharmillot
Copy link
Contributor

@clementcharmillot clementcharmillot commented Aug 19, 2024

Create the invoice for the send_gifts_to target, defaults to partner_id if not set.

Note: The first contract is used to get send_gifts_to, as the current code does for other fields.

CompassionCH/compassion-modules#1949

@clementcharmillot clementcharmillot self-assigned this Aug 19, 2024
@clementcharmillot clementcharmillot marked this pull request as ready for review August 19, 2024 08:48
Copy link
Member

@ecino ecino left a comment

Choose a reason for hiding this comment

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

The problem is that the field send_gifts_to is declared in the module sponsorship_compassion, which is a child from this module. Therefore, this field is not accessible from the module recurring_contract which could be theoretically installed without sponsorship_compassion. The fix has to be done inside the module sponsorship_compassion or any of its children.

Copy link

sonarcloud bot commented Aug 19, 2024

@clementcharmillot
Copy link
Contributor Author

I've edited this PR to create a trivial method to get the partner_id.
The PR CompassionCH/compassion-modules#1949 in compassion-modules overrides this method with custom logic for send_gifts_to.

@ecino ecino merged commit 5fdc6cc into 14.0 Aug 19, 2024
1 of 2 checks passed
@ecino ecino deleted the T1721-generate-gift-wizard-wrong-partner branch August 19, 2024 11:26
ecino pushed a commit that referenced this pull request Aug 27, 2024
* fix: use send_gifts_to if available

* feat: add a way to override the partner for a contract

---------

Co-authored-by: Clément <[email protected]>
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