Forums

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

Find all Issues which are not updated by particular user using JQL

Eswaran R
Contributor
September 24, 2019

Dear All,

 

   Am developing JIRA plugin in that I want to get all Issues which are not updated by particular user. I have the following piece of code. 

JqlQueryBuilder builder = JqlQueryBuilder.newBuilder();
builder.where()
.project(Project.getId())
.and()
.sub()
.issueType("Bug")
.and()
.updatedAfter(date_time)
.endsub();
results = searchProvider
.searchOverrideSecurity(user, builder.buildQuery(), PagerFilter.getUnlimitedFilter());

 The above code gives list of Issues which are in "Bug" type and updated after "date_time"

I want to add one more condition like Last Updated by <> 'Admin'

How to add this condition in JQL Query Builder?

 

Thanks in advance

Eswaran

2 answers

1 accepted

0 votes
Answer accepted
Tuncay Senturk
Community Champion
September 24, 2019

Hi @Eswaran R 

AFAIK, you can't do that with bundled Jira fields. Updated and updatedDate fields both store ast updated date, however there is no field like updatedUser.

I'm afraid, you should use a plugin and add a customfield statement into your JQL.

0 votes
Deniz Oğuz - The Starware
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.
September 24, 2019

Since you are developing a plugin you can create a new custom field yourself. It will be a CalculatedCFType custom field. But you need to implement a new searcher/indexer. In the Lucene indexer you need to save authenticationContext.loggedInUser as updating user. Implementing a new searcher/indexer is complex. You need to analyze Jira source code for existing indexers to get an understanding of it.

Eswaran R
Contributor
September 25, 2019

@Deniz Oğuz - The Starware Thank you for your suggestion...

Suggest an answer

Log in or Sign up to answer