Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA JQL display (Issues) when the comment field is updated in the "In Progress" status.

Fernando Passos
Contributor
July 3, 2020

I need some help writing up a JQL JIRA display (Filters). When the comment field is updated in the "In Progress" status. Show only when updated in the status (In Progress), this is possible?

 

I'm using the JQL below, but I don't know which expression to use for updating.

Project = "RHACT" AND status = "In Progress" AND issueFunction in commented ("?????")

Thanks.

1 answer

1 accepted

1 vote
Answer accepted
Italo Qualisoni [e-Core]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 4, 2020

Hi @Fernando Passos ,

I don't think you will be able to check if the comment entered when the issue was in In progress status.

Status and comments works independently, there is no native feature to map what was the issue status when the comment happen.

One way you could implement, would be creating a custom field "Last  Comment Status" and populate that field using a listener upon new comment.

So every new comment will trigger a listener that will be responsible to update the field "Last  Comment Status" to the current issue status;

In the end your JQL would be:

Project = "RHACT" AND status = "In Progress" AND "Last  Comment Status" = "In Progress"

Not sure if is this the ideal solution though, maybe using comments from the last 48 hours resolve your needs and is much simpler than proposed solution

Fernando Passos
Contributor
July 6, 2020

Hi  thanks for the explanation. 

I have some doubts. How or where do I add this listener? Another question is, I have a field called Last comment of type Scripted Field, it has the function of adding the last comment lying on the issue, could I use this listener in it?

Thanks.

Italo Qualisoni [e-Core]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 6, 2020

Below are some steps to implement the previous idea, probably there are others apps that you can use to update this field such as Automation for JIRA, but I've described with Scriptrunner cause you are already have it.

  1. Create a custom field "Last  Comment Status" it can be a single text
  2. Create a Listener that will populate this field (see more about listeners  here)
    • Listen Commend Added
    • The script will need to update the field "Last Comment Status" with the current issue status, you can find an example to update a custom field using listener here
  3. Then your JQL will be ready to use, when a new comment enter in an issue that is in Progress, this will trigger the listener updating the field "Last  Comment Status" to In Progress making the issue match your criteria
    • Project = "RHACT" AND status = "In Progress" AND "Last  Comment Status" = "In Progress"

About the script field, it's a different feature than listeners. 

Script field will return an calculated value, examples:

  • Total time this issue has been In Progress
  • Number of attachments an issue has
  • Display last comment date
  • Calculate issue urgency based on priority and impact

Listeners are automation that happens after some action examples:

  • Send an email when issue is created
  • Update a custom field value when a new comment is created
  • Link an issue with an related issue when issue is created

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events