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

Eswaran R 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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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
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 September 25, 2019

@Deniz Oğuz Thank you for your suggestion...

Suggest an answer

Log in or Sign up to answer