Hi, it would be nice to have possibility to to chcek role (group) to notify.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lennart’s picture

Category: task » feature

I second that.

David Goode’s picture

Hey,

That sounds like an cool idea, but notifications stores subscriptions one user at a time, so there isn't an easy elegant way to do this to my knowledge. Maybe look through the notifications issue queue for what people have done on that front, and perhaps you'll find some good ideas/addons that could be used to implement this functionality for this module.

David

roball’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev

Any progress in supporting role subscriptions?

David Goode’s picture

My previous post was a bit too pessimistic. I think that basically, although all notifications are per-user, you could just implement this in the UI pretty easily in team, at least on the form submit side. Just select all users of a role and act on each to create a subscription to the thread. The main challenges would be UI issues like whether to make this an option and/or have it appear concurrently with the rest of the per-user team form. Also, something cool might be to have roles be selectable and check off all users of that role, and then the user could customize... So, this is definitely doable but would require some non-trivial UI coding. Any takers?

David

kostajh’s picture

This is a great idea. Subscribing.

hanoii’s picture

Title: Select by role » Role notifications

marking #1180350: Role notifications as duplicate.

hanoii’s picture

Also probably #338247: clarification regarding what a "team" means! (potential for abuse of module) is related, although I was lost a bit on that issue.

hanoii’s picture

So, just starting to use this module, and although this issue is a few years old, this seems like a very useful feature and one I might soon need to develop.

It's weird that there hasn't been any actual improvement/patch/work on this front.

I was thinking into some kind of quick way of doing this.

w/o looking into the code at all, I am thinking this can be implemented with some minor modifications and maybe some JS.

For instance, we could have a :

"Notify all users" checkbox alongside the "Notify all users" checkbox that would check each user of that role.

This could be done in a few ways I guess, either by retrieving the role of each user, or maybe adding the role to the current user's view, which seems mandatory as I couldn't get the team UI to work w/o using the default view.

Some JS would then select each user with the role (easily done using some role classes) but I guess some server side processing for non-JS behavior should also be added.

So I wonder if there are any actual thoughts as I might actually work on this and I haven't seen much activity in terms of commits in the module, so I wonder what @David Goode thoughts are.

paugonzaleza’s picture

FileSize
21.62 KB

Hello, I modified this module to notify the roles. At this time is a hack, I want make a option to select if we want user notification or role notification.
In a time I make this better, but meanwhile if anybody want this feature, I post a patch here.
I attach a image to describe this feature

marco_cruz’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev

paueti

Can you publish your hack please?
Is it suitable to 7.x-3.x-dev?

thanks

paugonzaleza’s picture

FileSize
25.83 KB

Hi marco, my patch is made for 6.x-2.1-beta8. The code is horrible but it works.
I have no time. you can compare to see changes. Sorry..
hope this helps
If you have any question I'm here!

marco_cruz’s picture

Thanks a lot paueti!
From the analysis of the current 7.x-3.x-dev version, I've found that the group notification could be accomplished using jQuery.
But I need to get each user Role ID (in my scenario, each user has only one role ), so I'm trying to get the role id form the "notifications_team_users" view, without success so far...
I will take a look on your patch to see if i can reuse it on this version of "Team Notifications"