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":{}}
I am using jira 2.0.0 and tried using latest version (3.5.0) but it didn't fix the issue.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thankd @Oday Rafeh
I anticipated this and spent some time but couldn't locate the required documentation. Found it here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.