Forums

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

How with "JQL search" find my cf SLA?

Alex
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.
September 26, 2022

Hello everyone! Tell me please,  i can how get all issues , where value ("SLA OK") with JQL ?

SRGWER.png

 

6 answers

2 accepted

2 votes
Answer accepted
Nic Brough -Adaptavist-
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.
September 26, 2022

So, with a scripted field, they have two things we need to look at, and probably three for this question.

  • Scripted fields have an output "template", which tells Jira roughly what the content is and hence how to work with it.  You can find this at the bottom of the screen in which you write the script for the field.  It'll be text, date, number, etc.
  • Fields all have to be indexed to enable searching and sorting, and the indexers work differently for different types of data. Go to custom fields, find your field and use "edit", you'll see the name, description and searcher for the field there.  The searcher should be set to a type that can understand the type of data the template is telling Jira the issue is (but it might not be by default - you can imagine the sort of junk you get if you set a filed template to text and a searcher to number-range).  Can you check what that is?  It determines what JQL you can use.
  • We may also need to know what exactly you are putting into the results - your screenshot suggests that you've got html-formatted text as the result - is that right?
Alex
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.
September 26, 2022

@Nic Brough -Adaptavist- 

Specifically, this sla ("MRCHNT Handling") counts time only when the issue in status "in progress"

wfdwef.png

Alex
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.
September 26, 2022
Nic Brough -Adaptavist-
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.
September 26, 2022

Ok, so the template is text and your output is text.  (Presumably, your searcher is text based as well)

This means you won't be able to search it numerically or exactly, but "Mrchnt handling ~ SLA OK" should find issues with that coming out of the field.

Like Joseph Chung Yin likes this
Alex
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.
September 27, 2022

@Nic Brough -Adaptavist-  Thanks for the help. In the (admin panel) "custom field" I found my field and edited the value from "none" to "free text search" in the "search template" field and after indexing my field started showing up in jql search. Thanks a lot!

0 votes
Answer accepted
Alex
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.
September 27, 2022

SOLUTION!

In the (admin panel) "custom field" I found my field and edited the value

from "none" to "free text search" in the "search template" field and after indexing my field started showing up in jql search. Thanks a lot!  

My my final JQL search script :
project = MRCHNT AND "MRCHNT Handling" ~ "SLA FAILED"

wefwe.png

1 vote
Joseph Chung Yin
Community Champion
September 26, 2022

@Alex -

As per your reply to @Nic Brough -Adaptavist- / @Alex Koxaras _Relational_ -

If it is a scripted field, you can just use it in JQL as any regular field.  Question for you is why you are not using the using the SLAs which are part of your JSM project?

If you are using the out of the box SLAs setup of JSM, then you can just use the guide provided in the following link - https://support.atlassian.com/jira-service-management-cloud/docs/use-jira-query-language-jql-to-create-service-level-agreements-slas/

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

0 votes
Phill Fox
Community Champion
September 26, 2022

For the benefit of others who find this page when looking for answers on standard JSM functionality. 

If you use standard SLA fields in Jira Service Management you can use the JQL explained at https://confluence.atlassian.com/servicemanagementserver/using-jql-queries-specific-to-slas-939926424.html

In this particular example I would use the JQL 
"MRCHNT Handling" > remaining("1m") 

This should return any issues with more than 1 minute remaining in the SLA. 

Alex
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.
September 26, 2022

@Phill Fox  Hi! unfortunately it doesn't work..

ewfwe.png

Phill Fox
Community Champion
September 26, 2022

@Alex That is because my answer was specifically for folks using Standard JSM who came across this question. NOT for your specific challenge of having used Custom Fields. 

0 votes
Nic Brough -Adaptavist-
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.
September 26, 2022

What type of field is your SLA field?

Alex
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.
September 26, 2022

@Nic Brough -Adaptavist-  hi! scripted field

0 votes
Alex Koxaras _Relational_
Community Champion
September 26, 2022

Hi @Alex 

Why type is this field?

Alex
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.
September 26, 2022

@Alex Koxaras _Relational_ HI! type of field - scripted field

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events