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

fix: Fix and test cron job for Invoice Due Marking #6510

Merged
merged 4 commits into from Oct 8, 2019

Conversation

mrsaicharan1
Copy link
Member

@mrsaicharan1 mrsaicharan1 commented Oct 6, 2019

Fixes #6494

Short description of what this resolves:

Fixed event invoice marking error and added integration test for the same.

Changes proposed in this pull request:

  • Used Multi-Value table update logic in accordance with the ORM norms
  • Added integration test for the logic

@auto-label auto-label bot added the fix label Oct 6, 2019
@mrsaicharan1 mrsaicharan1 changed the title fix: Fixed cron job and added tests - Invoice Due Marking [WP]fix: Fixed cron job and added tests - Invoice Due Marking Oct 6, 2019
@auto-label auto-label bot removed the fix label Oct 6, 2019
@mrsaicharan1 mrsaicharan1 changed the title [WP]fix: Fixed cron job and added tests - Invoice Due Marking [WIP]fix: Fixed cron job and added tests - Invoice Due Marking Oct 6, 2019
@mrsaicharan1
Copy link
Member Author

mrsaicharan1 commented Oct 6, 2019 via email

app/api/helpers/scheduled_jobs.py Outdated Show resolved Hide resolved
app/api/helpers/scheduled_jobs.py Outdated Show resolved Hide resolved
app/api/helpers/scheduled_jobs.py Outdated Show resolved Hide resolved
app/api/helpers/scheduled_jobs.py Outdated Show resolved Hide resolved
@iamareebjamal
Copy link
Member

I don't think you read the answer in SO question, you can't use update after using join.

Also, you can run the test locally before pushing, nosetests tests/all/integration/api/helpers/test_scheduled_jobs.py

@mrsaicharan1
Copy link
Member Author

I'll be adding for another test case where it shouldn't be marked as due.

@mrsaicharan1 mrsaicharan1 changed the title fix: Fix and test cron job for Invoice Due Marking [WIP]fix: Fix and test cron job for Invoice Due Marking Oct 8, 2019
@auto-label auto-label bot removed the fix label Oct 8, 2019
@iamareebjamal
Copy link
Member

Seems like created_at check won't work this way. @mrsaicharan1 Can you tell me what does marking due means in terms of invoices?

@iamareebjamal iamareebjamal changed the title [WIP]fix: Fix and test cron job for Invoice Due Marking fix: Fix and test cron job for Invoice Due Marking Oct 8, 2019
@auto-label auto-label bot added the fix label Oct 8, 2019
@iamareebjamal iamareebjamal merged commit 376950d into fossasia:development Oct 8, 2019
@mrsaicharan1
Copy link
Member Author

Seems like created_at check won't work this way. @mrsaicharan1 Can you tell me what does marking due means in terms of invoices?

So the basic workflow here is that whenever an invoice is created, after 30 days from its creation, it would be marked as due [upcoming->due]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cron job for marking event invoices due is wrong
3 participants