Re: nosylist/assignedto per subject

Anthony Pankov <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
Hello, Martin.

> Can more than one user be assigned to an issue, or is this just a single
> value field?
It depends on your schema.

Default is:
issue = IssueClass(db, "issue",
    --->     assignedto=Link("user"), <----
                keyword=Multilink("keyword"),
                priority=Link("priority"),
                status=Link("status"))

This  mean  single  value  field. If you want multiple values you need
Multilink("user").  I  don't  suggest  you to  replace  'assignedto'  type
because default template/extension/detectors expect it singlevalued.

You may add to the issue scheme field such as
                members=Multilink("user"),
and than treat it by your own.



> Thank you Anthony,
> awesome, I will try that and extend it to our needs.
> And if I want to assign someone would I just do something like:
>         newvalues['assignedto'] = 'user1'
> Can more than one user be assigned to an issue, or is this just a single
> value field?
> Thanks for your quick help!
> Am 17.06.2015 17:27, schrieb Anthony Pankov:
> 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]


------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.