Greetings,
I´m currently working on an automation with the goal to collect fixVersions of all linked issues and fill a field with them. I basically already got that solution. When I link an issue or multiple issues at once in project A issue A the linked issues from project B will get written down in the description field (just for test purposes) of issue A. Now I wanted to get the next step: If some fixVersions appear multiple times I only want them in the field once.
Here is my current solution:
I´m kinda new to automations and smart values and it still confuses me a little bit. I know that you can go through list fields with {{#}} but first I need to create a list of the fixVersions to parse through? Any ideas on how to work this through?
Hi @Enrico_Hribal -- Welcome to the Atlassian Community!
First thing, what problem are you trying to solve by replacing the description of the linked issues with a URL to the Fix Versions for each issue? That is, "why do this?" Knowing that may help the community to offer better suggestions.
Until we know that...
When inside of an iterator, such as {{#issue.issuelinks}} ... {{/}} the issue prefix is not added: the scope is the issuelinks content and so only the field smart values are referenced.
Next, the smart value issuelinks has more structure than you show as link types have direction, such as "blocks" versus "is blocked by". And so a rule must select the ones you want, with {{issue.issuelinks.outwardIssue}} or {{issue.issuelinks.inwardIssue}} for the different directions.
Finally, smart values like issuelinks do not contain all data for those linked issues, such as the Fix Version field. If they did, a chain of issue links could theoretically pull in all issues in the entire Jira site! The workaround for this is to identify the keys of the issues you need, and then use the Lookup Issues action with JQL to gather their complete data...up to the limit of 100 issues.
Kind regards,
Bill
Greetings @Bill Sheboy
thanks for taking the time. Like I mentioned earlier, the description field is just used for testing. There is supposed to be a different custom field that I would create for this purpose.
The basic idea is based on the workflow shown below. The goal is to have a field in "Jira Task" (top left) which shows a list of all fixVersions that are included in the issues shown below (Bug, Maintenance, Feature). Those issues are either directly linked to the "Jira Task" Issue or are part of the epic shown in the top right, which is also linked to the "Jira Task" - issue. Each fixVersion should only be shown once if there are multiple issues with the same fixVersion.
I´m still pretty much in the early phase of finding a perfect solution for this problem. Any help is appreciated!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From what you describe, it appears you are trying to gather a distinct list of the Fix Versions in the linked issues (i.e., Feature, Bugfix, and Maintenance) and store that distinct list in a field in the Task. If that is correct...
Your rule shown uses a branch, and that will not allow updating the Task.
Instead consider using the Lookup Issues action with JQL to find the needed linked issues. Once those are available, all of their Fix Versions could be expanded into a comma-separated values list and cleaned up to remove the nested arrays with the remove function. Finally, that could be split and reduced using the distinct function to get the unique ones.
{{lookupIssues.fixVersions.name.join(", ").remove("[").remove("]").split(", ").distinct}}
Please note well: these will be the names of the versions, and not the links to open them as version on the releases pages.
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.