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

1458 - Fix itemization issue for independent expenditures #952

Merged
merged 3 commits into from
Jul 10, 2024

Conversation

sasha-dresden
Copy link
Contributor

@sasha-dresden sasha-dresden commented Jul 8, 2024

Issue #953

Copy link
Contributor

@mjtravers mjtravers left a comment

Choose a reason for hiding this comment

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

Change needed when determining itemization based on > $200 value. See inline comments.

When(
transaction_type_identifier__in=schedule_e_over_two_hundred_types,
then=Q(_calendar_ytd_per_election_office__gt=Value(Decimal(200))),
),
Copy link
Contributor

@mjtravers mjtravers Jul 8, 2024

Choose a reason for hiding this comment

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

We need to look at the calendar_ytd_per_election_office and not the _calendar_ytd_per_election_office because we need to potentially look at the IE's parent transaction value for the IE memos.

Here is the code showing how the calendar_ytd_per_election_office is calculated:
https://github.com/fecgov/fecfile-web-api/blob/develop/django-backend/fecfiler/transactions/managers.py#L321-L325

Here is the code showing that a IE memos are part of the schedule_e_over_two_hundred_types:
https://github.com/fecgov/fecfile-web-api/blob/develop/django-backend/fecfiler/transactions/schedule_e/managers.py#L7-L9

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated this logic to check against all 3

@mjtravers mjtravers changed the title hotfix-843 - Fix itemization issue for independent expenditures 1458 - Fix itemization issue for independent expenditures Jul 8, 2024
…zation to also check parent and grandparent transaction's calendar_ytd_per_election_office
Copy link

sonarqubecloud bot commented Jul 9, 2024

@mjtravers mjtravers merged commit 2c9ac24 into release/sprint-44 Jul 10, 2024
3 checks passed
@mjtravers mjtravers deleted the hotfix/843 branch July 10, 2024 15:23
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