Forums

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

JQL for deployment name and status

Deleted user June 9, 2020

Hello everybody,

for a JIRA automation I need a JQL query which shows me only issues which have been build for production and have the particular build number. So that is the query I am using:

deploymentName ~ 297 AND deploymentEnvironmentName ~ Production AND deploymentState ~ successful 

 But the issue here is, if the ticket had already a deploymentName 297 from the past (for example from a staging deployment) and then in the future has been deployed to production under a different number, this query will still find this issue.

So what I would need is something which checks both variables together in an AND. So find me issues which have been deployed to production with the PRODUCTION deployment name 297.

How can I achieve this?

1 answer

0 votes
Bill Sheboy
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.
June 9, 2020

Hi @[deleted] 

I do not know the answer to your question, but I wonder if you use the REST API to capture a few example issues, maybe it will show you additional attributes that you can query.

Please see here for an explanation of how to find additional possible smart values:

https://support.atlassian.com/jira-software-cloud/docs/find-the-smart-value-for-a-field/

Best regards,

Bill

Deleted user June 10, 2020

Hi @Bill Sheboy ,

unfortunately I could not find any value which refers to deployments through those REST APIs. Maybe they are there but I could not find them. Do you know what I would need to search for?

 

Greetings,

Mohamed

Bill Sheboy
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.
June 10, 2020

I would search for the text "deployment" as that seems to be prefix of those smart values.  If you do not see it, this may be one of those cases where the names in the JSON do not match the names available in JQL.  In that case, maybe search for the actual values and work backwards to identify any candidate attribute names.

Deleted user June 10, 2020

I tried both but could not find anything in that regard neither the values nor the name "deployment". I guess since it does not exist in JIRA and JIRA is fetching those values from Bitbucket maybe?

Bill Sheboy
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.
June 10, 2020

That must be the case.  Maybe check the REST API definitions to see if the Bitbucket stuff is available with another call.  However, if it didn't come back with the get call, I doubt it is available.

What happens when you export all fields from a JQL query? Can you see the field names then, are are they also from the Bitbucket feed and so not available?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events