Send ticket change notifications even if status doesn't change
[bpt/portal.git] / requestH.sml
index dd4e423..03e168d 100644 (file)
@@ -154,12 +154,17 @@ val statusToString =
      | REJECTED => "Rejected"
 
 fun notifyMod {old, new, changer, req} =
-    notify (fn (_, mail) =>
+    if old = new then
+       notify (fn (_, mail) =>
               (Mail.mwrite (mail, changer);
-               Mail.mwrite (mail, " has changed the status of this request from ");
-               Mail.mwrite (mail, statusToString old);
-               Mail.mwrite (mail, " to ");
-               Mail.mwrite (mail, statusToString new);
-               Mail.mwrite (mail, ".\n\n"))) req
+               Mail.mwrite (mail, " has added a comment to this request.\n\n"))) req
+    else
+       notify (fn (_, mail) =>
+                  (Mail.mwrite (mail, changer);
+                   Mail.mwrite (mail, " has changed the status of this request from ");
+                   Mail.mwrite (mail, statusToString old);
+                   Mail.mwrite (mail, " to ");
+                   Mail.mwrite (mail, statusToString new);
+                   Mail.mwrite (mail, ".\n\n"))) req
                
 end