Assignee not same as reporter

Rahul Aich [Nagra]
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.
January 12, 2014

I would like to list the ISSUE’s which are in (Resolved) state where the assignee is not same as reporter and save this as a filter.

I understand this is not possible using jira out of box

Any ideas?

Rahul

4 answers

1 accepted

2 votes
Answer accepted
JamieA
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.
January 28, 2014

In addition to John's answer... script runner has an expression JQL function that allows you to compare if values are the same, different, greater than etc.

Examples and docn here: https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+JQL+Functions#ScriptedJQLFunctions-expression(Subquery,expression)

Roberta April 1, 2019

It is very hard to justify an investment of $12K plus for a simple comparison query.

Like # people like this
1 vote
John Bishop
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.
January 12, 2014

Here's a couple options:

1. Purchase and install the JQL Tricks Plugin (https://marketplace.atlassian.com/plugins/com.j-tricks.jql-plugin). This plugin has the hasSameValues function which provides the ability to compare two fields. (http://www.j-tricks.com/jqlt-issue-functions.html)

2. Install the script runner plugin (https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner). Create a scripted field which will have the value of true if the assignee and reporter match, and false if they don't. Then you can query off of this scripted field. This scripted field doesn't have to be visible on your issue.

Rahul Aich [Nagra]
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.
January 12, 2014

thanks John..

Deleted user October 18, 2016

Hi John,

those are very great tools and I think they can help me what I am trying to do: I have a few parent tasks - lets say of the issue type "monthly meeting". Now from every "monthlymeeting" there are sub tasks created. What I want to do is to show all sub tasks on all parent tasks of the issue type "monthlymeeting" which are creating during a period of time. The reason why I want to seperate by issue type is that there are more issue types like "dailymeeting" and "semestermeeting", So a query to automatically show only the sub-tasks from a specific meeting with jtricks could look like this:

issue in parent ("issuetype = 'monthlymeeting'") and issue in hasSameValues("issue in parent ("issuetype = 'monthlymeeting'")", "customfieldValue")

The customfieldValue is inherited from the parents issue type, is there a way to compare not only one but two issues?

I hope this makes my usecase understandable. Thanks for your help and advice. 

Best regards,

Christoph

JamieA
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.
October 19, 2016

In ScriptRunner you would do:

issueFunction in subtasksOf("issuetype = monthlymeeting and created > -1w") and customField = monthlymeeting

although I'm not really sure the purpose of the custom field.

Deleted user October 19, 2016

Hi Jamie,

thanks for your answer.

I think the reason why I am struggling here is, that I want to compare a value of the parent issue with a value from the child issue. And potentially in my case I have a lot of different issue types (around 70+) which I need to manage. I would like to use a request which is relative and not absolute (so I just need to have one request and manage this and not 70). The way I would like to set up the comparison is with two fields. The issue type field in the parent issue and a custom field in the child issue. Maybe to be more precise: I want to show those issues with the add-on Issue Matrix. With one relative query I would just need to add one custom field. The other way there would be 70 different custom fields, which I really don't think is a good thing.

Do you have any advice on this?

Thanks in advance. 

Christoph

JamieA
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.
October 19, 2016

Oh I see, I'll think more about it.

Michael Wolfe
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2019

I want to compare the Fixed version and Affected version fields.  My company provides a few apps, and they share the same underlying architecture.  This means an issue found in one app could also exist in another app.  I want to compare the Fixed version against the Affected version to make sure they contain the same product name.  The goal is to make sure if the problem was found in product A, that product B wouldn't be in the Fixed field.  Would these tools assist me in this kind of complicated comparison?

0 votes
Pablo Beltran
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.
February 19, 2016

SQL for JIRA is the natural way to acheieve it as it transforms any JQL into a pure SQL query, then you can operate on the JIRA data by using SQL or JQL together according to your  needs.

Ex:

issue in sql("
select i.key from issues i where i.jql='resolution=unresolved' and i.assignee != i.reporter
")

Voila, the JQL above is just waht you are looking for smile

 

0 votes
David Smith August 26, 2014

Shame there is no option for either of these plugins for the Cloud offering would be useful to be able to create JQL where you could compare timespent > timeestimate

Suggest an answer

Log in or Sign up to answer