Forums

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

Search for issues except for issus in one project.

Erik Bredevangen July 30, 2019

Hi

I'm trying to create a JQL that will give me a list of issues assigned to a group of users, but issues in one Project should not be part of the result.  

I have tried several ways, but this is the one that is closest to give me the result. 

project != "Project1" AND assignee in (User1,User2,User3) and Status not in (Closed, Resolved,Done) and issuetype in (story,task, Sub-task) ORDER BY project

Since I'm logged in with User1 it only returns issues that belongs to User1. 

Is there a better way of doing this?

 

Thanks. 

 

 

4 answers

1 accepted

0 votes
Answer accepted
Milan Chheda [INFOSYSTA]
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.
July 30, 2019

As @Sreenivasaraju P mentioned, instead of `!=`, you can use `not in` and recommended to use membersOf() instead of adding each user.

Secondly, you should be able to see all issues and not just assigned to you, only if you have the permission to view other issues. So the query is correct,. you probably need to check the permission so as to view issues assigned to other users.

Erik Bredevangen July 30, 2019

If I just remove "project != "Project1" AND"

Then I get a list of issues for the 3 users, but for every project that we have.

Sreenivasaraju P
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.
July 30, 2019

There requests , which you are getting for other users is from Project1 or from any other project. 

If it is from Project 1, there may be 2 scenarios

  • Only Projects requests are assigned to Other users. There are no tickets assigned to them from other projects.
  • Other projects may have issue security like only current assignee can view those requests.

Please check

Erik Bredevangen July 30, 2019

The result is from several projects, allso Project1

Milan Chheda [INFOSYSTA]
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.
July 30, 2019

Every Project can have different permission scheme. You are probably don't have access to view issues from certain project. Can you verify that by checking if any issue security scheme is applied?

project != "Project1" AND assignee in (User1,User2,User3)
assignee in (User1,User2,User3)

As you mentioned, you are able to see issues from all projects including project1 too, can you please execute above 2 JQL and verify if the counts are matching. If not, there is some issue security scheme that is restricting your access to certain issues.

Like Erik Bredevangen likes this
Erik Bredevangen July 30, 2019

The result are: 

project != "Project1" AND assignee in (User1,User2,User3)

Result 943 issues.  

***

assignee in (User1,User2,User3)

 Result is 1016

***

project != "Project1" AND assignee in (User1,User2,User3) and Status not in (Closed, Resolved,Done) and issuetype in (story,task, Sub-task) ORDER BY project

Result is 20 (only Users1 issues)

***

If i run this:

assignee in (User1,User2,User3) and Status not in (Closed, Resolved,Done) and issuetype in (story,task, Sub-task) ORDER BY project

The result is 56, the only problem that is also list issues from Project1

Jimmy Seddon
Community Champion
July 30, 2019

Hey @Erik Bredevangen,

Just to be certain, you are sure that there are non-closed issues assigned to User2 or User3 that exist outside Project1?

As the others in this thread have indicated there is nothing in your JQL definition that should prevent it from returning the data you are looking for.

Erik Bredevangen July 30, 2019

@Jimmy Seddon you know that was spot on. Can't believe I missed that. 

Thanks for pointing me to the right direction.  

Like Jimmy Seddon likes this
Jimmy Seddon
Community Champion
July 30, 2019

I'm just glad you were able to get what you were looking for!

-Jimmy

0 votes
Erik Bredevangen July 30, 2019
Milan Chheda [INFOSYSTA]
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.
July 30, 2019

Happy to help and glad that your problem got resolved!

0 votes
Erik Bredevangen July 30, 2019

@Suchi Abram wrong community?

0 votes
Sreenivasaraju P
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.
July 30, 2019

Query look fine. 

Alternatively you can use project not in (project1) . It may help helpful in future , if you want to exclude more projects. 

If possible you can use assignee in membersOf("groupname") . If all assignees are part of any group.

Erik Bredevangen July 30, 2019

Project not in gives the same result. 

Sreenivasaraju P
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.
July 30, 2019

Yes. It will give the same result. 

Like Erik Bredevangen likes this

Suggest an answer

Log in or Sign up to answer