JQL Query/Syntax question

Michael Krass November 3, 2024

I would like to run a query/filter and display the Text within the Comment field, ideally sorted by last entered date.  

I'm trying the following syntax -

  • project = "Project-00001111" AND comment ~ "Work Activity".
  • I'm using the text string "Work Activity" as a search key. But, I don't know how, or if it possible, to have the actual text from the Comment filed, displayed in search results.

2 comments

Comment

Log in or Sign up to comment
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 3, 2024

Hello @Michael Krass 

Welcome to the Atlassian community.

With only native Jira functionality it is not possible to display Comments in the search results.

Is this a one time need or something you will need to repeat?

What problem are you trying to solve by searching for issues based on text in the Comments?

What do you need to do with the results?

Are you willing to consider a third party app to achieve your requirement?

 

Michael Krass November 3, 2024

@Trudy Claspill - thank you for responding.

This is something that will need to be repeated.

Currently, we're using the comments field to document actions taken related to the associated item/object. 

The idea is generate a report that would be filtered by epic, story, task, etc. and then filtered by most recent activity.

If a third party app is needed for this functionality, then yes, I would appreciate any pointers to the company/product.

Kristen Pitfield
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 3, 2024

Hi @Trudy Claspill , I was wanting to do something similar to @Michael Krass.  Do you know if this functionality would be available for future releases ie displaying comments in the search results?

Thank you in advance.

Kristen

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 4, 2024

@Michael Krass and @Kristen Pitfield 

@Stephen_Lugton 's suggestion is a solution that does not require a third party app. Automation for Jira is a native feature of Jira Cloud.

However it is important to note that there are limitations on Automation Rules with regard to how many you can execute in a month. The limit depends on your subscription plan. Refer to this document for more information on those limits and how usage is calculated.

https://support.atlassian.com/cloud-automation/docs/how-is-my-usage-calculated/

If you want to consider a third party app, there is an answer from the vendor of  JXL for Jira on this post highlighting how their app could help in a situation like this.

This is not a problem that I've tried to solve with an app, so I can't provide a specific recommendation for any particular app.

Stephen_Lugton
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 4, 2024

@Michael Krass would you be able to get a Jira admin to add a custom text field to your tickets?

If so you could get around the need for a 3rd party app by copying any comment that is added to a ticket to that text field using automation then in your search results you can have that field as a column.

E.g. I have a field called RAG comments, using the following automation I can update that field with any comments including the phrase "Work Activity"

Add work activity comment 1.png

 

The first edit issue for when the RAG comments field is empty assigns the last comment containing "Work Activity" to that field using the smart value

 

{{Issue.comment.last.body}}

 

Add work activity comment 2.png

 

The second edit issue assigns the last comment containing "Work Activity" to that field using 

 

{{issue.RAG Comments}}

{{Issue.comment.last.body}}

 

This will put the new comment at the bottom of the list, but you could reverse the order of the smart values to put it top

 

Add work activity comment 3.png

 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 4, 2024

Hello @Stephen_Lugton 

Is it not true that .last is used only with lists, and to refer to the last comment among all the comments on an issue you would need to use issue.comments.last ?

Also, when using the Commented trigger, to refer to that specific comment you can use the smart value {{comment}} without the issue. qualifier.

Stephen_Lugton
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 5, 2024

Hi @Trudy Claspill 

You're probably right about comments as opposed to comment, but comment worked when I tested the automation (and to be honest I actually copied it from this thread How-to-copy-the-last-comment-in-Automation-in-Jira-pl )

As to using .last, in the documentation for 'Automation smart values - issues' the following properties are given:

last comment.png

And finally I use the issue. qualifier specifically (1) when trying to give someone else a solution so that it matches up with the Atlassian documentation, and (2) so that I can trace which issue I am thinking about when working with child issues / created issues where I my also be using triggerissue. and I just try and keep the same structure throughout all automations.

Like # people like this
TAGS
AUG Leaders

Atlassian Community Events