Repository: fossasia/open-event-server

Issue:
Cancelled Order notifications should have link to the order page itself
Cancelled Order notifications currently don't have a link and neither the info about the relevant event name to the cancelled ticket or order itself for 
a) ticket buyer - Expected: It should have the event name and link to order page itself.
b) organizer - Expected: It should have the event name and link to the cancelled order page in the organizer ticket area

![Screenshot from 2019-06-17 14-11-40](https://user-images.githubusercontent.com/1583873/59603675-53044500-910a-11e9-9d55-0e47a64a9119.png)



Discussion:
@iamareebjamal  Please transfer it to server
@kushthedude This requires minor adjustments only, I will take this up.

Resolving patch:
diff --git a/app/api/helpers/notification.py b/app/api/helpers/notification.py
--- a/app/api/helpers/notification.py
+++ b/app/api/helpers/notification.py
@@ -2,6 +2,7 @@
 
 from app.api.helpers.db import save_to_db
 from app.api.helpers.log import record_activity
+from app.api.helpers.files import make_frontend_url
 from app.api.helpers.system_notifications import NOTIFS, get_event_exported_actions, get_event_imported_actions, \
     get_monthly_payment_notification_actions, get_monthly_payment_follow_up_notification_actions, \
     get_ticket_purchased_attendee_notification_actions, get_ticket_purchased_notification_actions, \
@@ -279,18 +280,25 @@ def send_notif_ticket_cancel(order):
         ),
         message=NOTIFS[TICKET_CANCELLED]['message'].format(
             cancel_note=order.cancel_note,
-            event_name=order.event.name
+            event_name=order.event.name,
+            event_url=make_frontend_url('/e/{identifier}'.format(identifier=order.event.identifier)),
+            order_url=make_frontend_url('/orders/{identifier}/view'.format(identifier=order.identifier)),
+            invoice_id=order.invoice_number
         )
     )
     for organizer in order.event.organizers:
         send_notification(
             user=organizer,
             title=NOTIFS[TICKET_CANCELLED_ORGANIZER]['title'].format(
-                invoice_id=order.invoice_number
+                invoice_id=order.invoice_number,
+                event_name=order.event.name
             ),
             message=NOTIFS[TICKET_CANCELLED_ORGANIZER]['message'].format(
                 cancel_note=order.cancel_note,
-                invoice_id=order.invoice_number
+                invoice_id=order.invoice_number,
+                event_name=order.event.name,
+                cancel_order_page=make_frontend_url('/events/{identifier}/tickets/orders/cancelled'
+                                                    .format(identifier=order.event.identifier))
             )
         )
 
diff --git a/app/api/helpers/system_notifications.py b/app/api/helpers/system_notifications.py
--- a/app/api/helpers/system_notifications.py
+++ b/app/api/helpers/system_notifications.py
@@ -350,16 +350,19 @@ def get_invite_papers_notification_actions(cfs_link, submit_link):
         'recipient': 'User',
         'title': u'Your order for {event_name} has been cancelled ({invoice_id})',
         'message': (
-            u"Your order for {event_name} has been cancelled by the organizer" +
-            u"<br/>Please contact the organizer for more info" +
+            u"Your order for <a href='{event_url}'>{event_name}</a> has been cancelled by the organizer " +
+            u"<br/>You can visit your cancelled ticket here : <a href='{order_url}'>{invoice_id}</a> " +
+            u"<br/>Please contact the organizer for more info " +
             u"<br/>Message from the organizer: {cancel_note}."
         )
     },
     TICKET_CANCELLED_ORGANIZER: {
         'recipient': 'User',
-        'title': u'Order ({invoice_id}) has been cancelled',
+        'title': u'Order ({invoice_id}) of {event_name} has been cancelled',
         'message': (
-            u"Order ({invoice_id}) has been cancelled" +
+            u"Order ({invoice_id}) has been cancelled " +
+            u"Please visit the link to check the cancelled orders for this event:" +
+            u" <a href='{cancel_order_page}'>{event_name}</a> " +
             u"<br/>Cancel Note: {cancel_note}."
         )
     },


Test patch: