Re: nosylist/assignedto per subject
Anthony Pankov <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <[email protected]> |
I think you can modify detectors/nosyreactions.py (or rename it to
mynosy.py).
Modification can be made just in 'updatenosy' function or in your
own function. If you create your own auditor function 'mynosy' you
have to replace strings in 'init':
from
db.issue.audit('create', updatenosy)
to
db.issue.audit('create', updatenosy, priority=10)
db.issue.audit('create', mynosy, priority=20)
Your function
def mynosy(db, cl, nodeid, newvalues):
# in case of creation title properties (subject) is in newvalues dict
if newvalues['title'] == 'important thing' :
nosy = newvalues.get('nosy', [])
...
nosy.append('user2')
..
newvalues['nosy'] = nosy
P.S. Code and solution above is unproven.
> Hi roundup'lers,
> I am quite new to roundup and need your help.
> I would like to inform specific users or groups of users about new
> issues based on the subject of the issue.
> I guess this should be possible via a detector or/and a reactor.
> But I am not familiar with writing such a script and have no idea
> how to make sure, that this script is executed priour to the nosy notification.
> as an example:
> a new mail issue is submitted with the subject "mail issue"
> I want to notify "user a, user b and user c" about issues that are =~ /mail/i
> and want to assign "user a" to an issue that =~ /important mail/i
> Can anybody show me how to realice this?
> From my understanding of the detectors (compared to the nosy
> detector) this should only be a few lines to
> * define the nosy group for each tag in a dict1
> * define assignees per tag dict2
> * create nosy members from the defined dict1
> * create assignedto users from the other dict2
> and everything else should be done from the normal nosy detector
> if this is called after this one.
> hope this is possible and someone can help me.
> best regards,
> Martin
>
--
Best regards,
Anthony mailto:[email protected]
------------------------------------------------------------------------------
_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users