Hei All.
I need to create a Jira filter using web request (POST). Filter needs to have double quotes, since it uses JQL search extensions. Here's a simple example of the problematic filter:
{
"description": "Filter created by jira automation",
"jql": "issue in linkedIssuesOfQuery("project=ACME", "is blocked by")",
"name": "temp-pp2"
}
When I escape the double quotes with backslashes, it removes those from the filter query and responses with bad request:
{ "errorMessages": [ "Unable to find JQL function 'linkedIssuesOfQuery(project=ACME, is blocked by)'." ], "errors": {}
and the request payload is this:
Payload
{ "description": "Filter created by jira automation", "jql": "issue in linkedIssuesOfQuery(\"project=ACME\", \"is blocked by\")", "name": "temp-pp2" }
So how to pass double quotes correctly? I've also tried with \", \\", \\\"
What I was thinking was:
My filter requires the version name, and that version creation will trigger the automation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was trying to help you get around your quote issue above. Sorry.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
First: Are you on DC, Cloud...
The error you are getting does not seem to be related to the quotes:
Unable to find JQL function 'linkedIssuesOfQuery(project=ACME, is blocked by)'."
The linkedIssuesOf function does not exist. I have done a similar POST to create a filter and it worked perfectly:
{
"description": "Test1",
"jql": "status in (\"In Progress\",\"Ready for Release\")",
"name": "Test1"
}
Try a simple JQL without the linkedIssuesOf function.
Jeroen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is however this:
issue in linkedIssues(issueKey, linkType)
Jeroen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
linkedIssuesOfQuery() is a function from the JQL Search Extensions for Jira add-on.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kelly,
I get that it is a function added by an app. As I remember that was also the case on Server / DC, but the error remains in his example.
So indeed, think we should ask @Päivi Passila , do you have that app?
Jeroen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hei
Thanks for the replies.
Yes, we have JQL search extensions and we are in a Jira Cloud.
The simpler jql filter creation will work, like project=acme and issuetype=bug.
But I've understood that even thought Jira native filters are not supporting functions like eg. linkedIssuesOfQuery(), I can create ones using rest api. Of course in jira filter they appear as a list of issues, like this: "(id in (101385,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25)) ...etc.."
And those needs then to be kept in sync in JQL search extensions.
And what comes to suggestion of using:
issue in linkedIssues(issueKey, linkType)
It wont work. I need issues linked with certain types of links in spesific issue. And this can be achieved only with jql extented search.
thanks, päivi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Päivi Passila Can you save the Extended JQL search as a filter and call that filter in the automation? That might be worth a try.
https://support.atlassian.com/jira-software-cloud/docs/jql-fields/#Filter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>>Can you save the Extended JQL search as a filter
This is what I try to do with the automation.
And That's where those double quotes are gone.
~päivi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Longer story of my intention is, that I would like to have an automation, that triggers, when the new version (release) is created for the project.
Then automation would create a Related work entry into that specific release object with the link to the filter, where we need to have more complex list of issues than just the default ones with issues having that fixversion.
~päivi
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.