Hi together,
hope someone can help me. For privacy reasons, I censor hostnames and main URLs.
I'm currently coding a script and i need a simple runjira query:
Search all open tickets for hostname XYZ* in four fields and only status open (not closed).
First, I built a query in the RunJira search bar:
Here is my link:
https://RUNJIRAURL.com/issues/?jql=summary%20~%20%22XYZ1*%22%20AND%20status%20!%3D%20Closed%20OR%20description%20~%20%22XYZ1*%22%20AND%20status%20!%3D%20Closed%20OR%20Identifier%20~%20%22XYZ1*%22%20AND%20status%20!%3D%20Closed%20OR%20comment%20~%20%22XYZ1*%22%20AND%20status%20!%3D%20Closed
And for better illustrate my query in the search bar:
summary ~ "XYZ1*" AND status != Closed OR description ~ "XYZ1*" AND status != Closed OR Identifier ~ "XYZ1*" AND status != Closed OR comment ~ "XYZ1*" AND status != Closed
It Works fine ! For the hostname XYZ1 I find two open tickets, fits perfect!
Now i can do the same search via Api:
My Api URL:
https://RUNJIRAURL.com/rest/api/2/search?jql=summary%20~%20%22XYZ1*%22%20AND%20status%20!%3D%20Closed%20OR%20description%20~%20%22XYZ1*%22%20AND%20status%20!%3D%20Closed%20OR%20Identifier%20~%20%22XYZ1*%22%20AND%20status%20!%3D%20Closed%20OR%20comment%20~%20%22XYZ1*%22%20AND%20status%20!%3D%20Closed
My curl in script:
#!/bin/bash
curl -X GET "https://RUNJIRAURL.com/rest/api/2/search?jql=summary%20~%20%22$HOST*%22%20AND%20status%20!%3D%20Closed%20OR%20description%20~%20%22$HOST*%22%20AND%20status%20!%3D%20Closed%20OR%20Identifier%20~%20%22$HOST*%22%20AND%20status%20!%3D%20Closed%20OR%20comment%20~%20%22$HOST*%22%20AND%20status%20!%3D%20Closed" --cookie "JSESSIONID=$SESSIONID"
Its the same Query like the Runjira search bar except from the main url, but now i find seven tickets, two open and five closed... but why? its the same query i dont get it.
Any ideas?
Kind Regards,
Timm
Okay I have a small update: I found out that if a open ticket is linked in a closed ticket, this will be still displayed via api.
Any Ideas how to fix that?
i also changed my query to:
text ~ "XYZ1*" AND status != Closed
https://RUNJIRAURL.com/rest/api/2/search?jql=text%20~%20%22XYZ1*%22%20AND%20status%20!%3D%20Closed
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.
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.