Forums

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

Unable to find JQL function 'tts.issuesHaveSomeExceededSlas(...)'

Suyog Wani March 18, 2023

For following query

from jira import JIRA
client = JIRA(basic_auth=(username, password), options={'server': base_url})
query_string = 'project=STORM AND status in (Open, "In Progress", "Ready for Review") AND Component="Analytics" AND issue in tts.issuesHaveSomeExceededSlas("Critical Security Risk", "High Security Risk", "Medium Security Risk", "Low Security Risk") ORDER BY "Security Risk" DESC, created ASC'
issues = client.connection.search_issues(query_string)

Got this error

JIRAError: JiraError HTTP 400 url: https://jira.inside-zen.com/rest/api/2/search?jql=project%3DSTORM+AND+status+in+%28Open%2C+%22In+Progress%22%2C+%22Ready+for+Review%22%29+AND+Component%3D%22Analytics%22+AND+issue+in+tts.issuesHaveSomeExceededSlas%28%22Critical+Security+Risk%22%2C+%22High+Security+Risk%22%2C+%22Medium+Security+Risk%22%2C+%22Low+Security+Risk%22%29+ORDER+BY+%22Security+Risk%22+DESC%2C+created+ASC&startAt=0&validateQuery=True&fields=%2Aall&maxResults=50
text: Unable to find JQL function 'tts.issuesHaveSomeExceededSlas(Critical Security Risk, High Security Risk, Medium Security Risk, Low Security Risk)'.

response headers = {'Date': 'Sat, 18 Mar 2023 07:57:22 GMT', 'X-AREQUESTID': '57x13797315x1', 'X-ASESSIONID': 'j021tz', 'Referrer-Policy': 'strict-origin-when-cross-origin', 'X-XSS-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'SAMEORIGIN', 'Content-Security-Policy': 'sandbox', 'Strict-Transport-Security': 'max-age=31536000', 'X-Seraph-LoginReason': 'OK', 'X-AUSERNAME': 'prodsec-service', 'Cache-Control': 'no-cache, no-store, no-transform', 'Content-Type': 'application/json;charset=UTF-8', 'Access-Control-Allow-Origin': 'http://localhost:8000', 'Vary': 'Accept-Encoding', 'Content-Encoding': 'gzip', 'Content-Length': '150', 'Connection': 'close'}
response text = {"errorMessages":["Unable to find JQL function 'tts.issuesHaveSomeExceededSlas(Critical Security Risk, High Security Risk, Medium Security Risk, Low Security Risk)'."],"errors":{}}


It was working just fine until 2023/02/20. The weekly task has been failing since 2023/02/27

I am using jira 2.0.0 and tried using latest version (3.5.0) but it didn't fix the issue.

2 answers

1 accepted

3 votes
Answer accepted
Tuncay Senturk
Community Champion
March 18, 2023

Hi @Suyog Wani 

Welcome to the Community!

The reason why you are getting that error is that those TTS Search 2.0 functions have been removed and replaced by 3.0 functions. Here you can find the information and also the counterpart functions of them.

In your case, tts.issuesHaveSomeExceededSlas has been replaced by

slaFunction = isBreached()

I hope it makes sense.

Suyog Wani March 18, 2023

Thanks @Tuncay Senturk  It worked.

Tuncay Senturk
Community Champion
March 18, 2023

Glad that it helped.

0 votes
Oday Rafeh
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.
March 18, 2023

Hi, @Suyog Wani 

there could be several reasons why it suddenly stopped working:

Plugin update or removal:

Ensure the "Time to SLA" plugin is still installed and up-to-date on your Jira instance. If it was recently updated, there might be changes in the function name or syntax. Check the plugin's documentation for any changes.

Plugin license expired:

Verify that the plugin license is still valid. Expired licenses can cause plugin features to stop working.

Changes in Jira configuration or permissions:

Ensure that your account or the account used for the API call still has the necessary permissions to access and use the plugin functions.

Plugin compatibility:

Ensure the "Time to SLA" plugin is compatible with the Jira version you're currently using.

Suyog Wani March 18, 2023

Thankd @Oday Rafeh 

I anticipated this and spent some time but couldn't locate the required documentation. Found it here.

https://appfire.atlassian.net/wiki/spaces/TTS/pages/49775289/SLA+Search+2.0+JQL+Functionalities#tts.issuesHaveSomeExceededSlas

Suggest an answer

Log in or Sign up to answer