Smart Query of "PROJ unresolved" searches on Status, not Resolution

Hi!

If you enter into Smart Query the following:

  • PROJ unresolved

I have always seen that you get back the JQL of:

  • PROJECT = PROJ AND Resolution = unresolved

But we are getting:

  • PROJECT = PROJ AND Status = unresolved

I believe I have correctly confirmed that there isn't a Resolution of "unresolved" by the following:

  • Resolution = unresolved and Resolution IS NOT EMPTY

and 

  • Resolution = unresolved

and

  • Resolution IS EMPTY

both return the same number of issues.

I have also confirmed that there is not a Status of "unresolved" set.

Also, I've confirmed removing the Project from the Smart Query as unresolved, still queries the Status = unresolved JQL, not Resolution = unresolved.

We have Server 7.3.6.

What am I doing wrong?

 

Status-Unresolved.PNG

 

2 answers

1 accepted

1 vote

The resolution field in Jira is special.  By default all newly created issues have a NULL value for the resolution field. (Unless of course your resolution field has been made a required field in your field configuration.  If that happens you need to assign a resolution value at the time the issue is created) So if you query that field for a new issue in the database, it has no value or a NULL value for that field by default.  The confusing part of this is that when you look at an issue in Jira like this, Jira will show the resolution field as Unresolved. (note the italics of this word)

This is a placeholder to indicate this field does not have a resolution, and has no value for that resolution field.

One of the complicating factors here though is the fact that Jira will allow you to create a resolution field with the name "Unresolved".  This can cause all sorts of unexpected behavior in Jira as a result.  This is because Jira will see issues that are listed with this "Unresolved" resolution and in turn it sees that field has a value. (note the lack of italics for the word "Unresolved" in this case though) That can be enough to make it look like the issue has some resolution value.   There is a KB that better explains this scenario and how to fix it in UNRESOLVED showing up as a Resolution for Resolved issues.

To see if your environment has this kind of resolution value, go to Administration >> Issues >> Resolutions.

This page will list all the valid resolution values in your instance of Jira.   If you do not see a resolution here called "Unresolved" and you wanted to find issues without a resolution yet, then the JQL query you should use would be

resolution is EMPTY

If you are just entering in the word "Unresolved" in the JQL search, the smart query is trying to match that word up against existing values of projects, statuses, resolutions, and possibly other fields like components for their existing values.  So if Jira is converting this to

status=Unresolved

That would tend to indicate to me that your instance does have a Status value called "Unresolved".  You can confirm this by going to Administration >> Issues >> Statuses.  This will list all the valid statuses of your Jira instance.

Hi Andrew,

Thank you for your response.

I have already confirmed via Admin -> Issues -> Statuses that Unresolved does not exist.

I've already confirmed that the Admin -> Issues -> Resolutions -> Unresolved also does not exist.

I can check for Components that might have a value of Unresolved, but since it is pulling up the Status query, I expect the problem has to do with the Status entries.

Is it possible that another Status was renamed previously and the original name is stored in the database?

Another variable to mention was that this is an instance that was recently migrated (about 4 months ago) from Cloud to Server.

Thanks again!

Rick

Hi Rick,

Sorry for the delay in response.  Thanks for checking those values.   I can't seem to get my Jira instance to reproduce this problem.  I tried to create a status in my instance called "unresolved", I then assigned an issue to this status, and then rename this status to something else.

Even when I do this, the quick search still defaults to looking for resolutions, not status.   The database lists the statuses in the issuestatus table.  However this table does not track historical changes made to these values.  So it is possible this has been renamed in the past and it isn't clear which status might have had that value in the past if any.

Does this happen for any other resolution names?  Like Done, Duplicate, Declined, Won't Do, etc?  Just trying to better understand the scope of this problem.  I can't say I understand why the quick search/smart search would be converting this query into looking at statuses unless there was a status in your system by that name.

Oh my gosh.  I found that Incomplete was correctly mapping to Resolution=Incomplete but I looked again at the Status fields just to be sure.

I swear that I confirmed earlier that there was no such status field having Unresolved but now there is.

(sigh).

Deleted that Status and all seems to be well.

Thank you so much for your patience.

Rick 

Oh sweet.  Glad to hear you figured out the cause here. I am sorry it took so long to reply to this thread.  That is my bad.  Thanks for following up here.

Cheers

I don't appear to be asking my question correctly and it appears that folks are believing this is just the old resolution field is not EMPTY problem.

My problem isn't with the resolution field, it's with Smart Query.

Entering in unresolved into the Smart Query field gets:

  • https://[my-JIRA-site]/secure/QuickSearch.jspa?searchString=unresolved

which is resolving to:

  • https://[my-JIRA-site]/issues/?jql=status%20%3D%20Unresolved

and not resolving to:

  • https://[my-JIRA-site]/issues/?jql=resolution%20%3D%20Unresolved

as it should.

What can I do to diagnose why this is happening?

Thanks!

Rick

Oh my gosh.  I found that Incomplete was correctly mapping to Resolution=Incomplete but I looked again at the Status fields just to be sure.

I swear that I confirmed earlier that there was no such status field having _Unresolved_ but now there is.

(sigh).

Deleted that Status and all seems to be well.

Thank you so much for your patience.

Rick 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Meet the AUG leaders of Northern Virginia

@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....

157 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you