Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
We've encountered an issue exporting this macro. Please try exporting this page again later.

Problem

You want to show the last comment made by a specific role on an issue as a custom field so that it will display in the issue results list or on an issue sidebar. This role could be for a customer support agent, or a developer for example.

...

Code Block
string lastDeveloperComment = "There have been no comments left by a developer for this issue";

for(integer comm in getAllCommentIds(key)) {
   JComment c = getCommentById(key, comm);
   if(isUserInRole(c.author, project, "Developers")) {
       lastDeveloperComment = c.text;
   }
}
return lastDeveloperComment;
We've encountered an issue exporting this macro. Please try exporting this page again later.