I'm trying to create a table within another field (acceptance criteria) using jira automation to display my linked issues however I can't get each issue to show on a new row.
Hi @Alan Alder -- Welcome to the Atlassian Community!
You are iterating over the issuelinks inside of the table row formatting. Try moving the iterator outside of the row's conditional check.
For example:
*Delivers Tickets*
||*Ticket*||*Status*||
{{#issue.issuelinks}}{{#if(equals(type.inward,"delivers"))}}|{{inwardissue.key}}|{{inwardissue.status.name}}|{{/}}
{{/}}
Kind regards,
Bill
Thanks @Bill Sheboy it's now put the record on the same row but different columns. Is there away to get them on different rows instead of columns
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oops...missing a newline after the conditional to trigger the new row. I updated the earlier post.
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.
@Bill Sheboy if I wanted to show both delivers and depend on linked issues and then put the link type in the table how would I go about doing that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could use the OR() conditional syntax, with two equals() calls, testing the different values. Then add an additional column for the link type in the table.
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/#or
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy sorry to be a pain I'm still having issues keep getting errors. The delivers is an inward type and the depends on is an outward type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The or() clause needs to wrap around the equals() tests for each type, as the equals() is what performs the test:
{{#if(or(equals(field, valueA), equals(field, valueB)))}}display when true{{/}}
Please note well: you are now mixing link directions in the expression, inward and outward links. And so the logic to include the type, key, and status will need to be dynamic to use the correct one: inward versus outward.
I encourage you to experiment and get each type, "delivers" and "depends on", working separately and then try combining them.
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.
Please post the expression you are trying. That will help to diagnose what is happening.
As an alternative to the dynamic elements, you may instead repeat the conditional blocks inside of the iterator.
{{#issue.issuelinks}}
conditional block to test for "delivers", and add a row
conditional block to test for "depends on", and add a row
{{/}}
This will also handle the case of adding the same issue twice in case it has multiple links to the same issue, but with different types.
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.