This insert script works perfectly:
Insert issues: issueFunction in linkedIssuesOfAllRecursiveLimited("filter = FFIOMESTR_Stories",1) and issuetype in (EPIC) and status not in (cancelled) and "Planning Quarter" not in (17Q1,17q2,17q3,17q4,18q1,18q2,18q3,18q4,19q1,19q2,19q3,19q4) OR issuetype in (EPIC) and team-name in ("The Maesters") and "Planning Quarter" not in (17Q1,17q2,17q3,17q4,18q1,18q2,18q3,18q4,19q1,19q2,19q3,19q4) AND status not in (Cancelled) OR issuetype in (EPIC) AND project in (FFIOMESTR) and "Planning Quarter" not in (17Q1,17q2,17q3,17q4,18q1,18q2,18q3,18q4,19q1,19q2,19q3,19q4) AND status not in (Cancelled)
I would like to add FFIORAFT,FFIOMCRU,FFIOWTCH,FFIONTBT to the filter and Raftel,Mind Crusaders,The Nights Watch,Nuts and Bolts to the Team Name
Thank you
Hi Michael,
Phil here, from ALM Works (we make Structure for Jira).
This looks like a pretty complicated Insert generator query you have, it's built using our Automation functionality to dynamically build your structure. You're also using a ScriptRunner function (the part that says issueFunction in linkedIssuesOfRecursiveLimited). If you want to edit this, you'll need the right permissions in that structure board. If that's the case, all you need to do is double click on the red row that has this generator in it, and you should see a dialog menu with that query, so you can just edit whichever section you want.
If you have any more questions about how Structure works, feel free to reach out through our support channel.
Hope that helps!
Phil
Hello Phil - Thank you for the above - I have the access to create/modify - I can click on automation add or delete (groups, ranks, sorts and inserts). I created a filter and know it works for one or multiple teams. My main issues are the coding of:
("filter = FFIOMESTR_Stories",1) - if I am using multiple teams below does that "1" change?
and team-name in ("The Maesters")
If I am adding teams how do I do that? Is there a tie back to the "1" above
for example
and team-name in ("The Maesters",Raftel,"Mind Crusaders","The Nights Watch","Nuts and Bolts")
or is it something like
and team-name in ("The Maesters",Raftel 1,"Mind Crusaders 2","The Nights Watch 3","Nuts and Bolts 4")
or
and team-name in ("The Maesters",Raftel 2,"Mind Crusaders 3","The Nights Watch 4","Nuts and Bolts 5")
Same Question on format for the projects
AND project in (FFIOMESTR)
Thank you again
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
That 1 refers to the depth of how many recursions you are looking at with the linkedIssuesOfAllRecursiveLimited function, you can read more on how that works at the ScriptRunner docs. So right now you are looking at all the issues that 'filter = FFIOMESTR_Stories' returns as well as all issues linked to that.
Every time you add an AND condition to the query, you are further filtering down the result. So in your case by changing team-name in ("The Maesters") to team-name in ("The Maesters",Raftel,"Mind Crusaders","The Nights Watch","Nuts and Bolts") you are being a bit looser in what you want to see (because not your results won't be just The Maesters team but all the others listed here too.
There is no tie back to that 1, since that was part of that initial query. Same logic applies to the project section.
A good way to think of it, is you have a series of queries you are string together. Each AND adds an overlapping element to the last one (think of a Venn diagram). The result you get at the end is the portion where all the circles overlap. When you use an OR condition, you are basically making one of the circles much bigger instead of adding a new one.
I think some resources on how JQL works will probably help you along here. A lot of partners have some great posts, Deviniti has a good one, idalko has a really solid one too, and if you can stomach the old school design, Atlassian has a pretty good one too.
Best,
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
I can confirm tht where you have the text of filter ='FilterName' that you can use the in keyword to pull in issues from mutiple filters in JQL by changing your text to be like filter in('FilterName','FilterName','FilterName') where you specify a comma seperated list of filters inside of the parentheses.
It is the same for Team Name where you are already using the in keyword so you can specify the multiple team names that you require as a comma seperated list inside of the parentheses.
Finally, as you are using ScriptRunner for Jira Cloud then I would advise you read the documentation for the cloud version of ScriptRunner here to see how the JQL functions it provides work in more detail.
I hope this helps.
Regards,
Kristian
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.