Skip to content

Commit f47e759

Browse files
committed
Queue: notify users when someone is assigned to an item and when they review it.
1 parent b1d9534 commit f47e759

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

editor/views/queue.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from editor import forms
99
from editor.models import EditorItem, ItemQueue, Project, ItemQueueChecklistItem, ItemQueueEntry, ItemQueueChecklistTick, IndividualAccess
10+
from editor.notify_watching import notify_watching
1011
from editor.tables import ItemQueueEntryTable
1112
import editor.views.generic
1213
from editor.views.generic import CanViewMixin, CanEditMixin, CanDeleteMixin, SettingsPageMixin, RestrictAccessMixin
@@ -265,6 +266,8 @@ def post(self, request, *args, **kwargs):
265266

266267
entry.save()
267268

269+
notify_watching(self.request.user, target=entry, verb='reviewed', action_object=entry)
270+
268271
return redirect(self.get_success_url())
269272

270273
def get_success_url(self):
@@ -293,6 +296,9 @@ def post(self, request, *args, **kwargs):
293296
entry = self.get_object()
294297
entry.assigned_user = request.user
295298
entry.save()
299+
300+
notify_watching(self.request.user, target=entry, verb='will review', action_object=entry)
301+
296302
return redirect(self.get_success_url())
297303

298304
def get_success_url(self):

0 commit comments

Comments
 (0)