Activating Targeted Searching
- Create a custom field of type CCC Last Comment(if it doesn't already exist)
- Configure the searcher for the custom field; choose Last Comment Searcher. (Edit the custom field searcher if there's already a Last Comment Custom Field Type)
- Re-Index JIRA
- Once indexing completes you are ready to use the new advanced JQL functions to do targeted Last Comment searching.
Examples of Searching
With the exception of the basic comment content search, the following examples are limited to Jira's advanced search and have no basic search equivalent.
Basic Comment Content Searching
Code Block | ||||
---|---|---|---|---|
| ||||
"<last comment field name>"~athlete |
Where: | <last comment field name> is the name of the Last Comment Custom Field |
Returns: | only issues whose last comment contained the word 'athlete' |
Supported JQL Operators
= | != | ~ | !~ | > | >= | < | <= | IS | IS NOT | IN | NOT IN | WAS | WAS IN | WAS NOT | WAS NOT IN | CHANGED |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Last Commented Author (user) Search
lastCommentAuthor()
Supported Operators
= | != | ~ | !~ | > | >= | < | <= | IS | IS NOT | IN | NOT IN | WAS | WAS IN | WAS NOT | WAS NOT IN | CHANGED |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Examples
Find issues whose last comment was made by user jsmith. The following examples are equivalent searches since id, key, and issue are aliases of issuekey.
Code Block issuekey in lastCommentAuthor("jsmith")
OR
Code Block id in lastCommentAuthor("jsmith")
OR
Code Block key in lastCommentAuthor("jsmith")
OR
Code Block issue in lastCommentAuthor("jsmith")
Find issues whose last comment was made by users who have "john" or "smith" in their display name. This search is not an exact string search. In this example, both "john" and "smith" are separate search terms. Please see next example for a more accurate search for "John Smith".
Code Block issuekey in lastCommentAuthor("john smith")
Find issues whose last comment was made by users who have "john" and "smith" in their display name.(i.e. someone named John Smith). The following examples are equivalent. Notice how the search string is encompassed by escaped quotation marks in the first example to indicate it is a single search term.
Code Block issuekey in lastCommentAuthor("\"john smith\"")
OR
Code Block issuekey in lastCommentAuthor("john") and issuekey in lastCommentAuthor("smith")
Find issues whose last comment was made by users whose username or display name start with "john". In this example, the * character acts as a wild card.
Code Block issuekey in lastCommentAuthor("john*")
Last Commented Group Search
lastCommentGroup()
Supported Fields: | |
Returns: | only issues whose last comment was made by a user in a particular group |
Supported Operators
= | != | ~ | !~ | > | >= | < | <= | IS | IS NOT | IN | NOT IN | WAS | WAS IN | WAS NOT | WAS NOT IN | CHANGED |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Examples
Find issues whose last comment was by users in the "customer" group. The following examples are equivalent to each other.
Code Block issuekey in lastCommentGroup("customer")
OR
Code Block issue in lastCommentGroup("customer")
OR
Code Block id in lastCommentGroup("customer")
OR
Code Block key in in lastCommentGroup("customer")
Last Commented Role Search
lastCommentRole()
Supported Fields: | |
Returns: | only issues whose last comment was made by a user in a particular role |
Supported Operators
= | != | ~ | !~ | > | >= | < | <= | IS | IS NOT | IN | NOT IN | WAS | WAS IN | WAS NOT | WAS NOT IN | CHANGED |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Examples
Finds issues whose last comment was by users in the "developers" role for a project. The following examples are equivalent to each other.
Code Block issuekey in lastCommentRole("developers")
OR
Code Block issue in lastCommentRole("developers")
OR
Code Block id in lastCommentRole("developers")
OR
Code Block key in lastCommentRole("developers")
Advanced Search Queries
The following examples show how our targeted search functions can work with other JQL statements
Examples
Find issues in a particular project whose last comment is in a project with the with a key of TEST and whose author is in the "customer" group and also in the "developers" role.
Code Block project = TEST and issuekey in lastCommentGroup("customer") and issueKey in lastCommentRole("developers")
Find issues whose last comment custom field named "Final Comment" contains the words "business" and "strategies" and whose author is in either the "managers" group or the "marketing" group.
Code Block "Final Comment" ~ "business strategies" and lastCommentGroup("managers marketing")
Find issues whose last comment is from an author who is in the "managers" group and the "marketing" group.
Code Block issuekey in lastCommentGroup("managers") and issuekey in lastCommentGroup("marketing")