JQL Used for The Jira Service Management Portal to Show Number of Issues
Asked by Jesse Ortega Jr:

The JQL that is used to pull issues into the JSM Portal needs to be modified. It is pulling tickets with the status of Closed when looking for Open.

Is it possible to modify the JQL so it looks for the status of issues?

Here is a snapshot of what I mean.

![SDportal.png](https://community.atlassian.com/t5/image/serverpage/image-id/329012iA8EC61C0B7D694F1/image-size/large?v=v2&px=999 "SDportal.png")


Answers:
author: Mikael Sandberg
body: If you look at the request in Jira, not the Portal, is the resolution set on those closed ones? The Portal filter will show them if the resolution is not set, that is how Jira determine if a request is done or not.

comments: author: Jesse Ortega Jr
body: I am needing this for the Portal.

Yes, I have seen that Jira goes by the resolution field, but these two tickets were closed without a resolution. Therefore, I would like to modify the JQL used for the portal to search for the status of Closed. Is this possible? Or how can I get a Resolution added once an issue is in the status of Closed?


author: Mikael Sandberg
body: The JQL used on the portal cannot be changed. What you can do is add a transition in your workflow that sets the resolution as described in this KB, [Best practices on using the "Resolution" field](https://confluence.atlassian.com/cloudkb/best-practices-on-using-the-resolution-field-968660796.html). Another option is to create an automation that sets the resolution for you, either as a scheduled one or an manual one.


author: Jesse Ortega Jr
body: Thanks Mike. I implemented the fix from the article, and all is good.


author: Joseph Chung Yin
body: [@Jesse Ortega Jr](/t5/user/viewprofilepage/user-id/3558849) -

In JQL, you just need to construct the following search using JQL syntax of

project = "\<your project key\>" and status = CLOSED (This will returns the issues result of all issues that is CLOSED in the project)

You need to review your JQL in question to see how the check for status is currently configured.

Here is the reference guide on how to use JQL -

<https://support.atlassian.com/jira-software-cloud/docs/what-is-advanced-search-in-jira-cloud/>

Hope this helps.

Best, Joseph Chung Yin

comments: author: Joseph Chung Yin
body: [@Jesse Ortega Jr](/t5/user/viewprofilepage/user-id/3558849)

I also agreed on what [@Mikael Sandberg](/t5/user/viewprofilepage/user-id/853579) suggested on Resolution field check in the JQL.

Best, Joseph


author: Joseph Chung Yin
body: [@Jesse Ortega Jr](/t5/user/viewprofilepage/user-id/3558849) -

Based on your reply against [@Mikael Sandberg](/t5/user/viewprofilepage/user-id/853579) suggestion, the root problem is that it seems (for those two specific issues) the WF used is not configured properly.

Typically, the WF configuration where issues transition into the terminal status, it is there the resolution value is set. Resolution value should never be controlled outside the WF. There may be also a possibility where the project has an automation rule (outside of the WF) configured in properly.

I would recommend you to review your WF configuration and ensure that the issue transition to the terminal status, the resolution value is set properly.

To fix your two existing "CLOSED" issues, you need to re-open it and re-close it again after you have your WF corrected where when moving issues to the CLOSED status has the resolution value set.

Hope this helps and makes sense.

Best, Joseph


author: Joseph Chung Yin
body: [@Jesse Ortega Jr](/t5/user/viewprofilepage/user-id/3558849) -

Lastly, I don't believe you cannot change the JQL used in the Portal UI based on my knowledge/experiences with JSM. The Portal UI processing logic is default and built-in.

Best, Joseph


Tags: cloud

jira-service-management

jira-service-management-cloud

jql