You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by sh...@apache.org on 2019/08/12 16:58:30 UTC
[allura] branch ss/8323 created (now bc8b89b)
This is an automated email from the ASF dual-hosted git repository.
shalithasuranga pushed a change to branch ss/8323
in repository https://gitbox.apache.org/repos/asf/allura.git.
at bc8b89b [#8323] Add notification task call support for ticket artifact
This branch includes the following new commits:
new bc8b89b [#8323] Add notification task call support for ticket artifact
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[allura] 01/01: [#8323] Add notification task call support for
ticket artifact
Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
shalithasuranga pushed a commit to branch ss/8323
in repository https://gitbox.apache.org/repos/asf/allura.git
commit bc8b89bd2b61c322a023c5670344859607e49dca
Author: Shalitha Suranga <sh...@gmail.com>
AuthorDate: Mon Aug 12 22:28:01 2019 +0530
[#8323] Add notification task call support for ticket artifact
---
ForgeTracker/forgetracker/tracker_main.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index 9bb1c1d..1ff9dea 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -46,6 +46,7 @@ from ming.utils import LazyProperty
from allura import model as M
from allura.lib import helpers as h
from allura.lib import utils
+from allura.tasks import notification_tasks
from allura.app import (
Application,
SitemapEntry,
@@ -940,6 +941,7 @@ class RootController(BaseController, FeedController):
g.spam_checker.check(ticket_form['summary'] + u'\n' + ticket_form.get('description', ''), artifact=ticket,
user=c.user, content_type='ticket')
c.app.globals.invalidate_bin_counts()
+ notification_tasks.send_usermentions_notification(ticket, ticket_form.get('description', ''))
g.director.create_activity(c.user, 'created', ticket,
related_nodes=[c.project], tags=['ticket'])
redirect(str(ticket.ticket_num) + '/')
@@ -1464,6 +1466,8 @@ class TicketController(BaseController, FeedController):
@require_post()
def _update_ticket(self, post_data):
require_access(self.ticket, 'update')
+ old_text = self.ticket.description
+ new_text = post_data.get('description', '')
g.spam_checker.check(post_data.get('summary', '') + u'\n' + post_data.get('description', ''),
artifact=self.ticket, user=c.user, content_type='ticket')
changes = changelog()
@@ -1544,6 +1548,7 @@ class TicketController(BaseController, FeedController):
self.ticket.commit()
if comment:
thread.post(text=comment, notify=False)
+ notification_tasks.send_usermentions_notification(self.ticket, new_text, old_text)
g.director.create_activity(c.user, 'modified', self.ticket,
related_nodes=[c.project], tags=['ticket'])
c.app.globals.invalidate_bin_counts()