On 04.09.2018 10:03, Yves Pausch wrote:
Tiny change: I had to add a 'field_set = set()'


    Still an issue: The person mentioned in 'tester' is now notified
    as expected when the ticket changes. But for the case we change
    the tester value initially or later on, also the new value has to
    be informed. I imagine adding the current value of 'tester' would
    do the job, but how to access that value?

    Thanks for your help.


Yes, that's working. I changed  the section in matches() the following way:

# Harvest previous field values
field_set = set()
if 'fields' in event.changes and self.field_name in event.changes['fields']: field_set.update(to_set(event.changes['fields'][self.field_name]['old'])) # collect the new tester(s) field_set.update(to_set(event.changes['fields'][self.field_name]['new'])) # potentially also collect the new tester(s)

I think the user_set was also supposed to be field_set. I adjusted https://trac.edgewall.org/wiki/CookBook/Notification/Subscriptions#Subscribeviacustomticketfield

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to