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: update scheduler time constraint for pending tickets #5926

Merged
merged 4 commits into from
May 21, 2019

Conversation

shreyanshdwivedi
Copy link
Member

Fixes fossasia/open-event-frontend#2951

Checklist

  • I have read the Contribution & Best practices Guide and my PR follows them.
  • My branch is up-to-date with the Upstream development branch.
  • The unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • All the functions created/modified in this PR contain relevant docstrings.

Short description of what this resolves:

Tickets that are unpaid are showing up as placed. Expected: Should show up as "Pending" and Expire after 3 days

Changes proposed in this pull request:

  • update scheduler time constraint
  • ensure that placed order also gets similar completed_at updation, mailing and notification as it was getting earlier.

@auto-label auto-label bot added the fix label May 18, 2019
iamareebjamal
iamareebjamal previously approved these changes May 18, 2019
@shreyanshdwivedi
Copy link
Member Author

@iamareebjamal I've to update the PR bcoz of conflicts. Please review now 😅

@codecov
Copy link

codecov bot commented May 18, 2019

Codecov Report

Merging #5926 into development will not change coverage.
The diff coverage is 71.42%.

Impacted file tree graph

@@             Coverage Diff              @@
##           development    #5926   +/-   ##
============================================
  Coverage        66.39%   66.39%           
============================================
  Files              286      286           
  Lines            13958    13958           
============================================
  Hits              9268     9268           
  Misses            4690     4690
Impacted Files Coverage Δ
app/api/helpers/scheduled_jobs.py 22.34% <ø> (ø) ⬆️
app/api/orders.py 34.21% <0%> (ø) ⬆️
app/api/schema/orders.py 88.88% <100%> (ø) ⬆️
tests/all/integration/api/helpers/test_order.py 97.61% <100%> (ø) ⬆️
app/factories/order.py 100% <100%> (ø) ⬆️
app/api/helpers/order.py 38.7% <100%> (ø) ⬆️
.../all/integration/api/helpers/test_csv_jobs_util.py 97.72% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d50d64...e5f878a. Read the comment docs.

iamareebjamal
iamareebjamal previously approved these changes May 18, 2019
@shreyanshdwivedi
Copy link
Member Author

Let's wait till it's frontend counterpart is merged. fossasia/open-event-frontend#2955

uds5501
uds5501 previously approved these changes May 19, 2019
@@ -139,7 +139,7 @@ def after_create_object(self, order, data, view_kwargs):
# TicketingManager.calculate_update_amount(order)

# send e-mail and notifications if the order status is completed
if order.status == 'completed':
if order.status == 'completed' or order.status == 'placed':
Copy link
Contributor

@abhinavk96 abhinavk96 May 19, 2019

Choose a reason for hiding this comment

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

@shreyanshdwivedi Your logic on FE and here don't agree, over there, after setting the status of order as placed, you are asking for user to fill payment details, where as this would actually send the tickets to him.
https://github.com/fossasia/open-event-frontend/pull/2955/files#r285388216

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll be updating front-end logic and display a different success message.

ensure placed orders get notifications/mails/completed_at update too
@shreyanshdwivedi
Copy link
Member Author

@CosmicCoder96 @iamareebjamal please review

Copy link
Contributor

@abhinavk96 abhinavk96 left a comment

Choose a reason for hiding this comment

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

@shreyanshdwivedi Won't the orders which are in the initializing state need to be put in expired state when the timer is over, I don't see the logic for that in this PR.

@shreyanshdwivedi
Copy link
Member Author

@CosmicCoder96 please review now :)

@shreyanshdwivedi shreyanshdwivedi deleted the ordersPage branch June 14, 2019 08:36
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.

Event Organizer Orders Page: Expired Orders Showing up as Placed Orders
5 participants