A user should be able to "follow" individual content page and receive email notifications about new comments on the page. We'll confirm the message stack (https://www.drupal.org/node/2180145) works well and enable it for #2585059: A user should be able to "follow" documentation pages, #2585061: A user should be able to "follow" forum pages, case study, and post content types.

Remaining tasks

- Move the follow functionality code out of project_issue.module into a more generic module, make it configurable for any content type on the site.
- #2585049: Redesign 'follow' button pattern to be applicable to all content types

Deployment

  • Add to drupalorg.make
    projects[message][version] = "1.11"
    
    projects[message_notify][version] = "2.5"
    
    projects[message_subscribe][version] = "1.x-dev"
    ; By default, don't notify blocked users
    ; https://www.drupal.org/node/2184567
    projects[message_subscribe][download][revision] = "5feb3d5"
    
    projects[message_follow][version] = "1.x-dev"
    projects[message_follow][download][revision] = "5a88d6f"

    Merge & update to drupalorg’s dev branch and bluecheese’s 2585049-follow branch

  • Add to settings.php
    $conf['message_subscribe_use_queue'] = TRUE;
    // Extend project issue’s flag for all following.
    $conf['message_subscribe_flag_prefix'] = 'project';
  • Enable modules: message message_notify message_subscribe entity_token message_follow
  • Export new permissions
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Lars Toomre’s picture

I certainly would encourage this feature. A number of times of I have gone looking for a solution to a problem in the forums without finding a solution yet being resolved. I would very much like if such forum items showed up in my issue list if there are new postings. Often I do not post anything there and am simply looking for a solution.

Probably another topic, but I will mention here. Another type of node that I would like to flag is specific documentation pages. For instance, if the coding standards page is changed or receives comments, I would really like to see that in my issue queue.

dww’s picture

Note: no node types other than issues will show up "in your issue queue". If we enable following for forum posts (and yeah, perhaps documentation pages) they're only going to show up at the "Your posts" page in your profile.

WorldFallz’s picture

As one of the main users of the forums I would have to disagree-- "+1 subscribe" is just as annoying in the forums as it is in the issue queues, lol. People posting forum threads are hoping to see it rise in their tracker from a response, not from someone having the save problem.

Up until just this past second, testing the feature on staging, I was completely unaware that doing this for forum threads was no longer part of the plan -- came a bit as a surprise or I would have mentioned something sooner.

And I think lars' mention of doing the same for documentation pages merits discussion as well. I know I would find it tremendously useful and would be interested to know if others would as well.

silverwing’s picture

Title: Allow users to "follow" forum posts without commenting » Allow users to "follow" forum posts and documentation pages without commenting

So far this hasn't been in any of the wireframes (or latest ones) of the community documentation but I think it would be very helpful to users. #1278256: Develop a plan to make it more clear that the current Documentation on drupal.org is community maintained..
EDIT: Adding #1287784: Follow-ups to improve the community docs

And I agree with WorldFallz, +1s are as annoying in Forums as they are in issues.

Lars Toomre’s picture

Sorry about that... I meant to say "My posts" queue.

I strongly believe that once the issue-type flag logic is released, we should expand the flagging logic to forums, documentation and even the new initiative type nodes currently under development.

drumm’s picture

We should use words consistently. If this doesn't do the same thing as following issues, it should be something else. Maybe "Add to My posts."

dww’s picture

@drumm: Please see my short comment at #1284694-50: Tweak UI of issue following (bluecheese). This does do the same thing as following issues (adds it to your tracker). Issues have some optional extras bolted on (namely e-mail notifications for issues you follow). There's a specialized view of issues you follow ("Your issues") since issues have additional data that are useful to display in a table. We might do a "Your documentation" view at some point with useful stuff like comment counts, last revision date, possibly even some of the current terms the page is tagged with. But they're still documentation pages you're following. "Follow" always means stuff you care about. How exactly we display the stuff you care about (and potentially notify you about changes) might be different depending on the kind of content you're following, but the central intention/action is always the same. See also #101341-36: 'My projects' should also display projects that are being co-maintained for more on a similar topic.

jhodgdon’s picture

Issue tags: +docs infrastructure

It sounds like maybe a separate flag (perhaps with an identical UI?) would make more sense for forums, doc pages, and etc. But we need to think a bit harder (IMO) about what would happen if you flagged a page or a forum or whatever, and also what the expectations would be for someone seeing the button:
- Email notifications when the page is updated or commented on -- is that even possible on d.o? We have it on g.d.o...
- A "my bookmarked pages" page somewhere (if the flag UI says "Bookmark this page")?
- A dashboard block for "my bookmarked pages"?

Also, tagging this issue, since this is now a docs infrastructure item.

dww’s picture

It's not clear to me why we want a separate flag for the different node types. And, we'd have to expand the tracker2 integration if we want it to be "watching" multiple flags. IMHO, we just want to let other node types use the same flag. Things will show up in "Your posts" (both the dashboard block and the separate page). If we want specialized views + dashboard widgets for "Documentation you're following", "Forums you're following", etc, like the "Your issues" we have now (which is effectively "Issues you're following", that's easy, but there's no real benefit to having separate flags (and some downsides).

No, killes does *not* want to allow e-mail notifications for forum updates. If we want that, we need to mount a campaign to change his mind and have a viable implementation plan. The email stuff on d.o now is native code in project_issue.

jhodgdon’s picture

I'm fine with it being the same flag, as long as people will not be confused about the results (if you flag an issue, you activate notifications, and it goes into "my issues". If you flag anything else, there are no notifications and it goes into "my posts".... this seems a bit confusing?)

Actually, do flagged issues go into my posts, and will flagging without a comment add things to my posts now? And if I unflag it, does that remove it from my posts, the way unflagging removes an issue from my issue? These are the kinds of usability gotchas I think we need to be aware of.

Anyway, I think the next thing to do is to brainstorm about what features we want forum/doc flagging to have, and then figure out how to make them happen?

dww’s picture

Yes. If you follow issues they show up in Your Posts and Your Issues. If you unfollow, they disappear from both. All this is explained in the front page news article I wrote.

Your Issues is basically Your Posts filtered to just show issues, with additional fields. Always has been.

Yes, it's a bit annoying that issues are the only node type that support email notifications. Maybe we can do something about that. But I wouldn't really want to delay this while we sort all that out. IMHO what I spelled out in the OP is all we need to do as a first step. I think we should move the question of email for forum updates to another issue so we don't block this on that one feature.

dww’s picture

Ps if you flag an issue it does not activate email notifications. that's a totally separate feature that you manage via a different UI. I don't know what's giving people the idea that follow implies email.

klonos’s picture

I don't know what's giving people the idea that follow implies email.

...I guess it is kind of a standard of how other sites work. That's what people are used to. I think it's a good think that the one does not imply the other in d.o and that we have more control over this (IOW whether we receive email notifications and for which projects and in what way).

Michelle’s picture

In forum software, you generally have the option of being emailed responses to anything you're following so I can understand the expectation.

Personally, my preference would be to not shove followed posts into the tracker/issues page and just have a simple page that lists all followed nodes regardless of what sort they are. All of those would then have the option of being emailed to you. Keep it simple and the same across the board, whether issues, forum posts, docs, whatever.

Michelle

jhodgdon’s picture

I don't think we're going to shove anything besides issues into the My Issues page, and I personally would be greatly dismayed if any other type of content showed up there, or if that functionality went away. The issues page has special fields pertinent only to issues, and color coding for status, that makes it easier for me to use than the generic Track page, and makes it impossible to mix with other content.

klonos’s picture

I would also like to be able to follow project pages. I mean to be notified on new revisions -> means that something of importance was possibly added (for example a new link to a screencast or a known issue etc).

I don't know if this belongs here though since for forum posts and documentation pages you can comment while not on project pages. Does my request fit here or should I file a separate issue for it? Perhaps an issue already exists and someone can point me to it since I wasn't able to find anything related after searching the queues(?).

hansfn’s picture

I think this is a good idea. It would be a nice improvement to drupal.org.

LeeHunter’s picture

The docs use case is a little different than the issue queue or forums where people generally only make one post at a time.

For documentation, I think it's important to not only have the ability to enable email notifications on followed pages, but also to specify whether to receive those notifications in the form of a daily or weekly summary. The reason is that when editing docs people often make numerous changes, one after another, saving after each change. You probably don't want to receive a new email every time someone adds a comma, saves the page, and then changes their mind (something I confess to doing on more than one occasion).

This will also help subject matter experts feel more comfortable about signing on to be a reviewer for a chunk of content (something we desperately need), knowing that they can stay on top of the page without getting deluged.

LeeHunter’s picture

Also ... and I'm not sure how difficult this would be to do ... but the ideal notification to send re. docs would be something that resembled the revision history (e.g. http://drupal.org/node/1709980/revisions) so that the recipient could see who made the changes and what the annotations were. If the recipient saw that all the changes were just me on a comma binge they could probably ignore the message whereas if the changes looked significant they could click a link in the message to go to the revision page and check the diffs. It wouldn't really make sense to send the text of the doc page and expect the recipient to read it over again.

killes@www.drop.org’s picture

This is obviously a great idea and I encourage people to get a dev instance and configure/code/test it. We may want to postpone after the D7 launch, though.

drumm’s picture

Yes after D7 would be great. Now isa great time to survey what is in contrib to do this with little or no custom code.

klonos’s picture

Title: Allow users to "follow" forum posts and documentation pages without commenting » Allow users to "follow" forum posts and documentation pages without commenting.

I vaguely remember somebody mentioning the idea of also allowing users to "follow" project pages. Was there an issue actually filed for this? I'm asking because searching d.o using the terms "follow", "subscribe" and "project" yielded too many results and I was frankly lost.

I'm often finding myself in the situation where important information is added to some project pages and I only find out about it after a really long time. Now, I realize there's an RSS feed available, but...

a) there's people like me that don't fancy RSS and would either prefer email notifications or some equivalent of the "My issues" page.

b) the current RSS feed is only about versions and respective changelogs while I'd like to be informed about changes in things like maintenance/development status, maintainer additions/removals and new revisions of the project body text.

silverwing’s picture

klonos’s picture

Thanx David! I couldn't recall if an actual dedicated issue was filed for this or if it simply was an idea posted in some related issue. So I was searching the entire d.o instead of limiting my search to just the issues I follow ;)

klonos’s picture

Title: Allow users to "follow" forum posts and documentation pages without commenting. » Users cannot "follow" forum posts and documentation pages without commenting.
Category: task » bug

...I'm calling this a bug.

mgifford’s picture

mgifford’s picture

mgifford’s picture

We should be able to leverage Flag Tracker much as the issue queue has. So rather than project_issue_get_follow_flag(), project_issue_get_follow_flags(), project_issue_flag_default_flags() & project_issue_flag() we should be able to use:

function drupalorg_handbook_get_follow_flag($node) {
  $flag = '';
  if (module_exists('flag_tracker')) {
    $flag = flag_tracker_get_tracker_flag($node->type);
  }
  return $flag;
}

function drupalorg_handbook_get_follow_flags() {
  $tracked_issue_types = array();
  if (module_exists('flag_tracker')) {
        $tracked_issue_types[$type] = flag_tracker_get_tracker_flag($type);
  }
  return $tracked_issue_types;
}

function drupalorg_handbook_flag_default_flags() {                                                                                                   
  $flags = array();

  $flags['drupalorg_handbook_follow'] = array( 
    'content_type' => 'node',
    'title' => t('Follow'),
    'global' => '0',    
    'types' => array(   
      0 => 'drupalorg_handbook',),    
    'flag_short' => t('Follow'),      
    'flag_long' => '',   
    'flag_message' => '',                  
    'unflag_short' => t('Unfollow'),         
    'unflag_long' => '',   
    'unflag_message' => '',      
    'unflag_denied_text' => '',          
    'link_type' => 'toggle',
    'roles' => array(
      'flag' => array(                         
        0 => 2,),
 'unflag' => array(
        0 => 2,
      ),
    ),
    'show_on_page' => 0,
    'show_on_teaser' => 0,
    'show_on_form' => 0,
    'access_author' => '',
    'i18n' => 0,
    'api_version' => 2,
  );
  return $flags;                             
}  

function drupalorg_handbook_flag($op, $flag, $content_id, $account, $fcid) {
  if ($flag->module === 'drupalorg_handbook' && module_exists('search_api')) {
    // Trigger index update for node for flag indexing.
    search_api_entity_update(node_load($content_id), 'node'); 
  }
}  

in drupalorg_handbook.module, right?

mgifford’s picture

Not working yet, but....

mgifford’s picture

Great summary from @mparker17 #2218551-8: A user should be able to "follow" a Section of content

This is just one piece. I don't see at this point how to turn the Forums into a Feature.

Books didn't have a feature to diff against, but I added on that had the basic Feature based on what is there now, then add in the Follow stuff.

drumm’s picture

Project: Drupal.org infrastructure » Drupal.org customizations
Version: » 7.x-3.x-dev
Component: Other » Code
Shyamala’s picture

tvn’s picture

Title: Users cannot "follow" forum posts and documentation pages without commenting. » A user should be able to "follow" individual pages of content and receive email notifications for new comments
Category: Bug report » Feature request
Issue summary: View changes
Status: Needs review » Active
Issue tags: -flag integration, -docs infrastructure +drupal.org documentation
Parent issue: #2218551: A user should be able to "follow" a Section of content »
Related issues: -#1434450: Add the ability to follow projects like we follow issues

We'll be covering this as a part of our work on Documentation section. We'll update issue 'follow' functionality to be more generic and enable it first for documentation pages and then for other content types (forums, case studies).

tvn’s picture

drumm’s picture

Assigned: Unassigned » drumm
drumm’s picture

Issue summary: View changes
drumm’s picture

Issue summary: View changes
drumm’s picture

Issue summary: View changes
drumm’s picture

Issue summary: View changes
drumm’s picture

Issue summary: View changes
drumm’s picture

Issue summary: View changes
drumm’s picture

Issue summary: View changes

The notification I've drafted so far is:

MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8Bit
X-Mailer: Drupal
Return-Path: noreply@drupal.org
Sender: noreply@drupal.org
From: noreply@drupal.org
To: 0d01c08ea8ed70d0d7f689f18f1277d1@sanitized.invalid
Subject: [Drupal.org] road.cc

bacon commented at
https://follow-drupal.dev.devdrupal.org/node/2596329#comment-10757872

Comment body text.

--
Unfollow comment notifications at
https://follow-drupal.dev.devdrupal.org/node/2596329#block-message-follow-follow,
log in and click unfollow.
hestenet’s picture

Exceptionally minor nitpick: should it be 'commented on' rather than 'commented at'? Otherwise I think it's got all the essential info.. Short and sweet is best.

drumm’s picture

Issue summary: View changes

New draft of the email:

MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8Bit
X-Mailer: Drupal
Return-Path: noreply@drupal.org
Sender: noreply@drupal.org
From: "drumm (follow drupal dev)" <noreply@drupal.org>
To: 7813258ef8c6b632dde8cc80f6bda62f@sanitized.invalid
Subject: [Case study] road.cc

drumm commented:

This is a test comment

View on follow drupal dev:
https://follow-drupal.dev.devdrupal.org/node/2596329#comment-10757880

--
To unsubscribe from notifications about this content, go to
https://follow-drupal.dev.devdrupal.org/node/2596329 and click
“Unfollow”. (And make sure you are logged in.)

  • drumm committed 3af663d on 7.x-3.x
    Issue #1304216: Add commenter name to from address
    
  • drumm committed 7a5a0a7 on 7.x-3.x
    Issue #1304216: Skip message_subscribe queue on cron
    

  • drumm committed 33d84bc on 7.x-3.x
    Issue #1304216: Give admins permissions to administer flags
    

  • drumm committed 00c3983 on 1304216-follow
    Issue #1304216: Add commment notification message type
    
  • drumm committed 33d84bc on 1304216-follow
    Issue #1304216: Give admins permissions to administer flags
    
  • drumm committed 3af663d on 1304216-follow
    Issue #1304216: Add commenter name to from address
    
  • drumm committed 7a5a0a7 on 1304216-follow
    Issue #1304216: Skip message_subscribe queue on cron
    

  • drumm committed 00c3983 on 7.x-3.x, dev
    Issue #1304216: Add commment notification message type
    

  • drumm committed 7f71afe on 7.x-3.x, dev
    Issue #1304216: Export Message stack’s permissions
    
drumm’s picture

Status: Active » Needs review

This is all set up on integration.devdrupal.org and working well in our testing so far. (integration has a different http password because it has near-production-level data, you can log into Drupal with your production password, but the site won’t get security updates as promptly as staging.)

drumm’s picture

Status: Needs review » Fixed

This has been deployed for the first two content types - case study and post.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

mgifford’s picture

Thanks @drumm!