diff --git a/WebContent/html/webpages/redirect/ticketAdminRedirect.jsp b/WebContent/html/webpages/redirect/ticketAdminRedirect.jsp
index 7a23711..e85a30f 100644
--- a/WebContent/html/webpages/redirect/ticketAdminRedirect.jsp
+++ b/WebContent/html/webpages/redirect/ticketAdminRedirect.jsp
@@ -37,11 +37,10 @@ int locationid = Integer.parseInt(locationidstr);
//approve form was submitted
if(request.getParameter("approve") != null){
- //TODO include in time of action so that the status fields can be updated in the ticket
TicketQueries.acceptTicket(ticketid,deviceid,locationid,Integer.parseInt(navsso));
User client = EmployeeQueries.getEmployeeByID(TicketQueries.getUserID(ticketid));
boolean notificationPreferences = (Math.floor(client.getNotificationPreferences()/2)%2==1);
- //The second least significant bit of notificationPreferences - the 4's place - is used for ticket approval notifications.
+ //The second least significant bit of notificationPreferences - the 2's place - is used for ticket approval notifications.
if(notificationPreferences){
NotificationQueue q = new NotificationQueue(client,"ticketConfirmations");
q.start();
@@ -50,6 +49,13 @@ if(request.getParameter("approve") != null){
//reject form was submitted
if(request.getParameter("reject") != null){
TicketQueries.rejectTicket(ticketid);
+ User client = EmployeeQueries.getEmployeeByID(TicketQueries.getUserID(ticketid));
+ boolean notificationPreferences = (Math.floor(client.getNotificationPreferences()/4)%2==1);
+ //The third least significantbit of notificationPreferences - te 4's place - is used for ticket rejection notifications.
+ if(notificationPreferences){
+ NotificationQueue q = new NotificationQueue(client, "ticketRejections");
+ q.start();
+ }
}
%>