You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Below is my jql query -->
labels in (security, Security, security-automated, Security-automated, security-library, security-external, Security-Library, Security-Sast, security-sast, pentest, Pentest, external-customer, External-Customer, appsec, AppSec, Appsec, security-researcher, security-customer, psg-crypto) AND issuekey not in (1218809, 1207609, DRPVG-596, 1258291) AND project not in ("Delete Me") AND issuetype not in (Test, "Test Execution", "Test Folder", "Test Plan") AND (affectedVersion in releasedVersions() AND status != Closed OR affectedVersion in unreleasedVersions() AND Severity in ("1 - Severe", "2 - High") AND status != Closed) AND issuetype = Bug AND project = DRSMX AND component in (CMDB, "Smart IT", "Service Level Management (SLM)", ITSM, ITSM_RKM, SLM, SRM, Platform) AND labels in (Security-Library, security-library, library-automated) AND Severity in ("1 - Severe", "2 - High") AND labels not in (E-case) ORDER BY Severity ASC
It works on UI but when i do it from API it fails to retrieve.
Firstly, your query could be simplified quite a bit - you have a section which states project not in and issuetype not in, but then further down you have project=DRSMX and issuetype=Bug which overrides the earlier statements. You also have 2 sets of labels= with duplicate values.
What would be useful is for you to show the actual API call that you're passing in - this error looks as though you have something wrong with the syntax, probably missing quotes. Let me see the code you're using to build the API call
@Warren Actaully i am using maven dependency where i am calling jiraClient.searchIssues(JQLquery) while passing JQLquery to this function then i am getting above error
My Jira instance doesn't have many of the fields or parameters that your system does, so I can't even vaguely get it working in my UI
If you're saying that the JQL works in your UI, then the best I can offer is to slowly build the JQL up and see where it goes wrong. So, start with
labels in (security, Security, security-automated, Security-automated, security-library, security-external, Security-Library, Security-Sast, security-sast, pentest, Pentest, external-customer, External-Customer, appsec, AppSec, Appsec, security-researcher, security-customer, psg-crypto)
If it doesn't work, you know there's something wrong with the first bit.
If that works, add AND issuekey not in (1218809, 1207609, DRPVG-596, 1258291) and try again.
Keep adding bits until something goes wrong.
Don't worry about whether what's being returned makes sense or not, it's just to build up the JQL and work out where the error is creeping in.
@Warren Your above trick worked for me you are genius man thanks a lot for your quick help.
Have one more doubt,
Que. I am getting summary as null.
why I am not able to get whole summary of my JIRA for ex. Summary --> [9.8] [CVE-2020-13692] [postgresql] [42.2.5.jre7]
my maximum JIRA summary are in square bracket and it seems like square bracket is reserved keyword?
How i can get exact summary in my result?
That's strange, because I put your summary into one of my tickets and when I run an API call, the result is shown below
I don't believe that square brackets are reserved or are a problem at all - are you getting other summaries coming through in full, but the one that has square brackets is null? What language are you using? Could your code be causing the issue?
@Warren I am using java and yes you are correct I am getting other summaries but except above scenario. I am also wondering how come it is happening.
I will try to debug it further mean while if you have any suggestion then please let me know will do it your way.
For the ticket which is giving you the blank summary, if you put the following into your browser where you're logged in to Jira in another window, what do you get?
https://CoName.atlassian.net/rest/api/3/search?jql=key=ABC-123&fields=summary
where CoName is your company's name in the Jira URL and ABC-123 is the key of the ticket that shows a blank summary
https://abc.com/rest/api/latest/search?jql=key=ABC-123&fields=summary
this works for me
While debug i am getting the same response but while fetching in my code i am getting null.
Right, so that means that the API is correctly returning the summary.
I have no idea why your code isn't getting that summary, you'll need to try and step through the code to understand it.