It's very possible that this is actually a problem with the project_issue module, but I don't have time right not to troubleshoot and wanted to at least report the issue.

In the issue #358773: Add node link field handlers for project* the original issue itself assigned the drupal.org upgrade term. Comment #1 then removed that term.

In the emails I got from being subscribed to the issue, here is the metadata tables copied from the emails:

For the original issue:

Issue status update for 
http://drupal.org/node/358773
Post a follow up: 
http://drupal.org/comment/reply/358773#comment-form

 Project:      Project
 Version:      6.x-1.x-dev
 Component:    Views integration
 Category:     task
 Priority:     normal
 Assigned to:  Anonymous
 Status:       active
 Reported by:  dww
 Updated by:   dww

And for the first comment:

Issue status update for 
http://drupal.org/node/358773
Post a follow up: 
http://drupal.org/comment/reply/358773#comment-form

 Project:      Project
 Version:      6.x-1.x-dev
 Component:    Views integration
 Category:     task
 Priority:     normal
 Assigned to:  Anonymous
 Status:       active
 Reported by:  dww
 Updated by:   dww

As you can see, in neither of those is the drupal.org upgrade term mentioned, whereas it should have been in both tables.

Comments

Flying Drupalist’s picture

-Edited out.

Damien Tournoud’s picture

Project: Comment alter taxonomy » Project issue tracking
Version: 5.x-1.x-dev » 6.x-1.x-dev
Component: Code » Issues

I believe that this is a project_issue issue.

aclight’s picture

Ultimately, the reason that this bug is showing up is that in comment_alter_taxonomy_project_issue_metadata(), for the case where $op == 'diff', we have this code:

      $old_terms = _comment_alter_taxonomy_build_term_list($node, $old_data);
      $new_terms = _comment_alter_taxonomy_build_term_list($node, $new_data);

Within _comment_alter_taxonomy_build_term_list(), there is this code:

  else {
    $cid = isset($comment->cid) ? $comment->cid : 0;
    $result = db_query(db_rewrite_sql('SELECT cat.tid, t.* FROM {comment_alter_taxonomy} cat LEFT JOIN {term_data} t ON cat.tid = t.tid LEFT JOIN {vocabulary} v ON t.vid = v.vid WHERE cat.nid = %d AND cat.cid = %d ORDER BY v.weight, t.weight, t.name', 't', 'tid'), $node->nid, $cid);
    while ($term = db_fetch_object($result)) {
      $term_list[$term->tid] = $term;
    }

So, when the project issue module is processing the original issue node, comment_alter_taxonomy_project_issue_metadata() effectively tells project_issue that there were no changes in terms for the issue, which is technically true, and so project issue doesn't print any terms that were added to the issue when the original issue was created.

The Issue tags terms are displayed in the metadata table at the top of all issue nodes on the web page because within project_issue_view() comment_alter_taxonomy_project_issue_metadata() is called with $op == 'current'. However, when project_issue is sending out emails of issues, it doesn't do the same thing, because for issue emails we don't always want to show all of the metadata for an issue and we want to point out changes in things like status, priority, etc. within the "table" at the top of the email.

So to actually fix this problem I think we'd need to rewrite some of the code in project issue that generates this table at the top of the email, probably so that it behaves more similarly to how the code executed when viewing the node behaves.

Pasqualle’s picture

Term changes in issue not being properly displayed in comments. Could be the same problem?

Sometimes the previous term change is not displayed in the comment, and it is confusing.
It seems like previous comments are refreshed after changing the terms (adding back the same term)..
Do you need repro steps, or are you aware of this behavior?