Skip to content

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

@fossasia fossasia deleted a comment Oct 6, 2019
@fossasia fossasia deleted a comment Oct 6, 2019
@iamareebjamal
Copy link
Member

@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 force-pushed the due-fix branch 2 times, most recently from e11df48 to 41bea62 Compare October 8, 2019 02:10
@fossasia fossasia deleted a comment Oct 8, 2019
@mrsaicharan1 mrsaicharan1 force-pushed the due-fix branch 2 times, most recently from 8f0c3b8 to 054a822 Compare October 8, 2019 16:12
@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
@mrsaicharan1 mrsaicharan1 force-pushed the due-fix branch 2 times, most recently from a8d515c to 37eb3f8 Compare October 8, 2019 16:21
@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