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

Transferrable until #106

Closed
wants to merge 51 commits into from
Closed

Transferrable until #106

wants to merge 51 commits into from

Conversation

vidya-ram
Copy link
Member

@vidya-ram vidya-ram commented Sep 21, 2016

  1. Add ability to block transfers after a certain date.
  2. CC past assignee incase of ticket transfer.
  3. Changed variable names from attendee to assignee.

Open a new PR #118 based out of the latest master

@@ -38,11 +39,16 @@ def assign(order):
db.session.commit()
else:
if line_item.current_assignee:
past_assignee = line_item.current_assignee.email
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest previous_assignee_email instead of past_assignee.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@@ -55,15 +55,19 @@ def send_line_item_cancellation_mail(line_item_id, subject="Ticket Cancellation"


@job('boxoffice')
def send_ticket_assignment_mail(line_item_id):
def send_ticket_assignment_mail(line_item_id, past_assignee):
Copy link
Contributor

@shreyas-satish shreyas-satish Sep 27, 2016

Choose a reason for hiding this comment

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

This method can be little more lightweight. It can just accept a list of recipients from the caller, instead of having knowledge of a 'past assignee'.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

"""
Sends a confirmation email once details are filled and ticket has been assigned.
"""
with app.test_request_context():
line_item = LineItem.query.get(line_item_id)
order = line_item.order
subject = order.item_collection.title + ": Here's your ticket"
msg = Message(subject=subject, recipients=[line_item.current_assignee.email], bcc=[order.buyer_email])
if past_assignee:
recipient_list = [order.buyer_email, past_assignee]
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be cc_list since recipient would imply the intended recipient of the email.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@@ -55,15 +55,15 @@ def send_line_item_cancellation_mail(line_item_id, subject="Ticket Cancellation"


@job('boxoffice')
def send_ticket_assignment_mail(line_item_id):
def send_ticket_assignment_mail(line_item_id, recipient_list, cc_list):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think cc_list should have [] as its default parameter since it isn't mandatory.

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