Modify

Opened 17 months ago

Last modified 10 months ago

#10622 new enhancement

send mail when new ticket is created

Reported by: roger@… Owned by: hasienda
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords: fine-grained subscriber
Cc: falkb, doki_pen Trac Release:

Description

It would be handy to allow a user to select to receive a message when a new ticket (or wiki page or whatever) is created. Then they could elect to Watch This item. If they are not interested, they do nothing.

As it is now, they do get these creation messages. Unfortunately, in order to get these, they also get messages about tickets in which they are not interested. Getting notifications on creation only would allow users fine-grained control over what they get messages about. We have users who want to follow some ticket activity that they did not originate and will not contribute to. The current setup does not allow them to get messages about ticket creation without also getting messages about all other ticket activity.

Attachments (2)

20121120_announcer_pref-subscriptions_conditional-subs_preview.png (65.9 KB) - added by hasienda 17 months ago.
preliminary design of conditional subscriptions for AnnouncerPlugin user preferences
20121120_announcer_pref-subscriptions_conditional-subs_preview_v2.png (66.5 KB) - added by hasienda 17 months ago.
updated preview incorporating label text as suggested by falkb in comment:19

Download all attachments as: .zip

Change History (27)

comment:1 Changed 17 months ago by rjollos

#10627 is related, as a milestone create subscriber is planned as part of the implementation. That might serve as a pattern for more fine-grained create/modify/delete subscribers for each resource.

comment:2 follow-ups: Changed 17 months ago by rjollos

  • Cc falkb added

Also related: falkb recently requested notify me when a ticket that I updated is modified in this mailing list post. Actually, he requests the inverse don't notify, which I think we already satisfy.

If we add many more rules, I think the preferences panel will need to eventually be simplified:

rule created updated deleted resolved
notify me when a ticket I own is
notify me when a ticket I reported is
notify me when any ticket is

Well, I don't think that is a perfect idea, but I'm hoping it serves the purpose as forming a point of discussion that could lead to better and more refined ideas. You can see how one might want even more flexibility. In the example shown, just imagine adding a column for every ticket action (assigned, reopened, ...), and then dream up more rules and even more dimensions to the configurability (e.g. ticket milestone changed, different resolution states, ... ;) We have to keep it simple enough, but there will always be good arguments for more and finer-grained rules - e.g. the project manager only wants to be notified when a ticket's milestone is changed, a ticket's custom field named due date is changed and when tickets are resolved as fixed ... seems reasonable, right?

comment:3 in reply to: ↑ 2 ; follow-up: Changed 17 months ago by falkb

Replying to rjollos:

Also related: falkb recently requested don't notify me when a ticket that I updated is modified ... I think we already satisfy.

Yes, I realised that works, AnnouncerPlugin is not that noisy as Trac's default notification system.

If we add many more rules, I think the preferences panel will need to eventually be simplified:

I second your idea to replace the combobox by a matrix of checkboxes. Though I also want to remark a certain group of users is quickly overstrained if they see more than 5 things at once, I mean such matrix is more for experts. It's always a trade-off between flexibility and simplicity, that's why what about offering only a few scenarios (quit, ..., noisy), and more fine-granular by your checkbox-table on a sub page "adapt to user defined behaviour" which then will be added as new scenario ... In principle like the desktop theme customization on Windows 7, you know what I mean.

comment:4 follow-up: Changed 17 months ago by anonymous

By fine grained, I really meant at the level of the ticket/wiki page/etc. The existing 'Follow This' is enough. The problem is that you don't know there is a ticket to potentially follow unless you get all ticket activity. Just being able to find about the creation of something makes a lot of things possible for the user with the current state of things. Currently, to find that out, you will find out lots about tickets in which you have no interest.

The next step of following all things that can happen is more than I would expect. Given that work flows can be rather complicated with perhaps many states, a menu to track those state changes would be a very unruly monster!

comment:5 in reply to: ↑ 4 Changed 17 months ago by rjollos

Replying to anonymous:

The next step of following all things that can happen is more than I would expect.

Right, and your request is very reasonable, but my point is that next along comes someone else with a very reasonable request that is slightly different from yours that warrants one or more additional rules, for example, to only want to know when tickets are closed, so we need to consider how in the long run we can support so many different configuration options in a clean way, and without overwhelming the user and administrator.

comment:6 in reply to: ↑ 3 Changed 17 months ago by rjollos

Replying to falkb:

It's always a trade-off between flexibility and simplicity, that's why what about offering only a few scenarios (quit, ..., noisy), and more fine-granular by your checkbox-table on a sub page "adapt to user defined behaviour" ...

Yes, I like the idea of having simple and advanced configuration views, and predefined configurations for the simple view. We should definitely keep that in mind.

comment:7 in reply to: ↑ 2 Changed 17 months ago by falkb

Replying to rjollos:
... and then dream up more rules and even more dimensions to the configurability (e.g. ticket milestone changed, different resolution states, ... ;) We have to keep it simple enough ... snip

For instance, I have a concrete request here: to have automatic notification emails on ticket creation when its ticket custom field 'project' meets one of the values the user has subscribed to... Is is imaginable to marriage that with your suggested checkbox table? I suppose such wishes from real life could help to find out if the implementation is generic enough.

comment:8 Changed 17 months ago by hasienda

  • Keywords fine-grained subscriber added

I don't think, that the IAnnouncementPreferenceProvider should be (ab)used for generating more advanced (read: complicated) custom subscription preferences. It simply doesn't scale well, because all field values are reflected in session_attribute. Announcer's shift to the current subscription model has obsoleted many of these entries, and I hope to reduce their number even more.

That said, I'm not at all against the idea of allowing more subscription customization. Quite the contrary is true. I've been following the discussion closely. When my feature bloat alarm bell rang, I drafted a proposal for optionally adding almost arbitrary conditions to any subscription that fits into the new subscription model. But I won't disclose more before in-deep discussion and before I have a working prototype as a proof-of-concept.

comment:9 follow-up: Changed 17 months ago by roger@…

Just keep in mind that the birth of an item is a special thing. Knowing about those allows you to perhaps even use other tools to manage things. You cannot act on something until you know that it exists. That is why I singled that out.

comment:10 in reply to: ↑ 9 Changed 17 months ago by hasienda

  • Cc doki_pen added

Replying to roger@opq.se:

Just keep in mind that the birth of an item is a special thing. Knowing about those allows you to perhaps even use other tools to manage things. You cannot act on something until you know that it exists. That is why I singled that out.

Agree. Announcer has the privilege to know a bit about transitions, i.e. for tickets there are property changes readily available in the Ticket object supplied by the change listener. For other Trac realms it might not be that straight-forwards, and we may need to look-up relevant information from resource's history, or never get a clue for items, that lack revision support (i.e. attachments, milestones).

Therefor starting with ticket subscribers should yield the most feature-rich and efficient use of subscription constraints. I'm working on this feature here. It's constraint editor will borrow much code from TracQuery ones, but transitions are the outstanding new constraint, that will resolve your demand here. Sure, we must have it for ticket status, but may want it for a number of other fields too.

Speaking more about the upcoming conditional subscriptions I got struck by an unexpected idea: This might be the road towards subscriber consolidation. I.e. while we use one of AllTicketSubscriber, TicketOwnerSubscriber, TicketReporterSubscriber or TicketCustomFieldSubscriber today, we may just pick the AllTicketSubscriber and add (OR-ed) constraints like

  • user (me) == owner (yields notification equal to TicketOwnerSubscriber)
  • user (me) == reporter (yields notification equal to TicketReporterSubscriber)
  • user (me) ~= custom cc-field (yields notification equal to TicketCustomFieldSubscriber)

according to our needs. You see? We may want to keep the current, rather lengthy list if subscription options as the 'simple' way (predefined constraints + 'always'/'never') compared to the one that we'll get with the subscription adverb 'conditional' (new constraint editor). I'll disclose a screen-shot of my vision to explain a bit more, what I'm talking about here.

Have to keep an eye on good default values, but it addresses my worries about feature bloat rather nicely. Even more I'm quite convinced, that this is the missing piece for completing the already great subscription model. Thanks for pushing the issue.

comment:11 follow-up: Changed 17 months ago by hasienda

The attached screen-shot shows subscription user preferences with minor tweaks (text-less method buttons for rule deletion and up/down order changes) as well as the filter section for a conditional subscription matching only tickets that just got closed.

Changed 17 months ago by hasienda

preliminary design of conditional subscriptions for AnnouncerPlugin user preferences

comment:12 in reply to: ↑ 11 Changed 17 months ago by rjollos

Replying to hasienda:

The attached screen-shot shows subscription user preferences with minor tweaks (text-less method buttons for rule deletion and up/down order changes)

This seems like a very nice enhancement on its own, so definitely +1 for this, and I suggest considering to push this change prior to the other more time consuming changes discussed in this ticket. The old style buttons just didn't look right, particularly with Trac 1.0.

as well as the filter section for a conditional subscription matching only tickets that just got closed.

Looks great. Is this meant to be a very specific example of how filters could be applied? My head is swimming with other possibilities :) Are you also envisioning filters for, e.g. the any ticket part? Conditionally notify me when a ticket with Component = AnnouncerPlugin and Type = defect changes. I have no idea how we can make all this layout nicely, but your association with ticket query was brilliant.

comment:13 follow-up: Changed 17 months ago by falkb

+1 from me

... just one thing I don't understand is the checkbox in 'Previous values'... ? ...

comment:14 in reply to: ↑ 13 ; follow-up: Changed 17 months ago by hasienda

Replying to falkb:

+1 from me

Thanks to both of you for encouraging these changes in general.

... just one thing I don't understand is the checkbox in 'Previous values'... ? ...

The hint below says: Don't care, if you're not after transitions. If only current (== new values) of a ticket are of concern, just leave it all empty/unchecked. A totally empty section will not only be possible, its probably the default to start from, if you choose 'conditionally' instead of 'always' or 'never'.

In the example screen I demonstrate a standard trigger-like configuration. You have to configure before/after here, but I think that's still pretty clear.

Furthermore I've found, that new tickets are yet another case. Mathematically explained the ticket is initialized, going from all-None/all-NULL values, but I can't imagine to make this a real option that could be understood - intuitively - even by advanced users. So I suggest to just check that checkbox, if you require notification for only new tickets. Clearer?

comment:15 in reply to: ↑ 14 Changed 17 months ago by falkb

Replying to hasienda:

... if you're not after transitions...

This is the actual problem. I didn't understand what it means, and in such case one can't understand the checkbox. You should explain it in a clearer hint. A common user doesn't understand what you mean with a transition.

comment:16 follow-up: Changed 17 months ago by falkb

Do I understand attachment:20121120_announcer_pref-subscriptions_conditional-subs_preview.png right that one gets mail only for the special case when the state changes from accepted|assigned|new|reopened to closed?

comment:17 Changed 17 months ago by hasienda

Replying to rjollos:

Replying to hasienda:

The attached screen-shot shows subscription user preferences with minor tweaks (text-less method buttons for rule deletion and up/down order changes)

This seems like a very nice enhancement on its own, so definitely +1 for this, and I suggest considering to push this change prior to the other more time consuming changes discussed in this ticket. The old style buttons just didn't look right, particularly with Trac 1.0.

It was more for making them smaller, accessible at a distinct place in front instead of behind subscription description texts of very different length. But you're probably right about the more contemporary design, if used with current stable. Note though, that I added a bare minimum of additional style definitions yet. Most styles are meant to be inherited from Trac core, what especially applies to text block and button design.

as well as the filter section for a conditional subscription matching only tickets that just got closed.

Looks great. Is this meant to be a very specific example of how filters could be applied? My head is swimming with other possibilities :) Are you also envisioning filters for, e.g. the any ticket part?

Only thing, that is NOT in there right now, is the ticket ID. I think, we shouldn't mix WatchSubscriber with the rest, because it'll require a view on it's own. Already a dozen watched items/item groups would overcrowd the subscription list, not to speak of hundreds of items. I'm still after WatchlistPlugin integration for this specific subscriber.

Anyway, the selection now is always|conditional|never for EVERY available subscriber, even if it wouldn't be sensible for AcctMgr notifications to have a filter on ticket properties. I'll rather implement the old row of checkboxes from the IAnnouncementPreferenceProvider there. So probably just on filter per Trac realm (ticket/wiki/...).

Conditionally notify me when a ticket with Component = AnnouncerPlugin and Type = defect changes. I have no idea how we can make all this layout nicely, but your association with ticket query was brilliant.

In ticket-related subscription you'll set it as easy as you would in the custom ticket query. I think, that making it as similar as possible is the best way to make it intuitive - well at least to Trac people.

Guess, it would be sensible to create a new supplementary wiki page below AnnouncerPlugin/ with more use-cases to show the upcoming code in action, right? After I've made progress on the actual implementation up to the point, where I can just snapshot configurations from the real web-UI without GIMP mods, I'll do.

comment:18 in reply to: ↑ 16 Changed 17 months ago by hasienda

Replying to falkb:

Do I understand attachment:20121120_announcer_pref-subscriptions_conditional-subs_preview.png right that one gets mail only for the special case when the state changes from accepted|assigned|new|reopened to closed?

Yes, that's the essence. Other changes are optional, meaning, that they may happen. So the status change is the only requirement for the notification to happen. And of course you may add additional constraints to the 'Current values' section, to i.e. only care for closing of tickets owned/not owned by you.

Same for new tickets: Check 'alternatively require a new ticket' (feel free to suggest a better label) and setup 'Owner' constraint in the 'Current values' section below to get only matching new ticket notification.

Configuration possibilities are practically endless, so more examples will be require to show-case this new feature as hinted in a previous comment of mine.

comment:19 Changed 17 months ago by falkb

I suggest to change the labels:

  • from "Previous values" to "from"
  • from "Current values" to "to"
  • "alternatively require a new ticket" to "or on new ticket creation"

and then I read

conditionally notify me when any ticket changes
from
    ...
   or
    on new ticket creation
to
    ...

which makes things clearer IMHO.

Changed 17 months ago by hasienda

updated preview incorporating label text as suggested by falkb in comment:19

comment:20 Changed 17 months ago by hasienda

I did it, and while slightly bigger, the structure seems clearer indeed. I tried to improve the general hint about the 'from' section too. Thanks for review and your suggestions.

comment:21 Changed 17 months ago by falkb

LikeIt++

comment:22 Changed 17 months ago by hasienda

Another point for discussion is the default filter, meaning the initial filter configuration right after adding a 'conditionally' subscription. Some options:

  • exactly empty
  • common 'status' choice option with everything but 'closed' preselected
  • ...

The inverted "just-status" (only 'closed') is shown in both previews, with extra selection for previous values.

Opinions? Suggestions?

comment:23 follow-up: Changed 17 months ago by anonymous

the initial filter config should probably reflect the current behaviour of a standard Trac installation, for having a seamless changeover

comment:24 in reply to: ↑ 23 Changed 17 months ago by hasienda

Replying to anonymous:

the initial filter config should probably reflect the current behaviour of a standard Trac installation, for having a seamless changeover

The default query is for own, open tickets. For default (ticket) filter it would be equivalent to

  • reporter=username
  • status!=closed (or the respective status selection)

so this is what you suggest?

comment:25 Changed 10 months ago by hasienda

#11178 has been closed as a duplicate of this ticket.

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.