I am trying to create a list variable that I create myself and is not pulled from any fields in Jira. The idea is to be able to iterate through this list in a for loop in Jira Automation to help create multiple epics with different epic names. I know this is incorrect syntax but this is what I am trying to go for:
customList =
{{#list}}{{This is my epic name 1}}{{This is my epic name 2}}...{{This is my epic name n}}{{/}}
and then in a for loop be able to access each element in the costomList object to efficiently create many epics.
The error I get when I try to create a smart value like I did above is: "The provided smart value was unable to be resolved to an object."
Hi @Talha Shah and welcome to the community,
You can do that by doing the following:
valueA,ValueB,ValueC
Your rule should look like this:
Let me know if that worked! :)
Hey Alex,
Thanks for such a thorough response, it has been really easy to follow and unbelievably useful. Just one question though, when I try to create the myList csv variable, I'm not able to use any spaces within each "string". For example, for your myList smart value youve used "valueA,valueB,valueC" and then split at the commas. Would it be possible to somehow have the smart value "value A,value B,value C" (note the space between 'value' and 'A')? Looking forward to hearing back.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Talha Shah unfortunately, no. You can't use any spaces.
However, as a workaround, what you could do is to write your summaries as e.g.:
this_is_my_summary,this_is_another_summary,yet_another_summary
And what you will do is to replace the "_" with a space using the .replace function on {{myEpicSummary}}:
{{myEpicSummary.replace("_"," ")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ah ok, and then can I do both the replace and split actions simultaneously in the for loop?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alex Koxaras _Relational_ - With respect to spaces, it turns out you can also get around this by entering your list as {{This has a space,This does too}} into the Smart Value field and then remove the {{ }}. This seems to work and doesn't require the additional use of replace
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked great for creating the items, but it doesn't seem to create the issues in the same order that the original variable is entered. In looking at the example above, valueA was created as DSP-340 and ValueC is DSP-343, leaving ValueB most likely as DSP-344.
Ideally valueA, ValueB, and ValueC would be DSP-340, DSP-343, and DSP-344 respectively.
Please let me know if there is a way to read the variable into the for loop and create in the same order.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do I link the created tickets to the original one using the same automation, if its one issue, I can use the most recently created branch function to link it. But this already having a branch I do not see a way around. Please advise
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Raghu ManiIt might be better to create a separate question for that. Then you can share more details. I do not think there is enough detail here to give you a good answer.
I am not sure how you are creating the new ticket. However, I expect that, when creating the ticket, you should be able to specify links. I.e., you shouldn’t need a separate step after creating the ticket to create the link. You should just include the link in the ticket immediately. You might have to use an advanced JSON specification for the ticket to do that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nathan Phillip Brink have posted the question separately, any suggestions would be much appreciated
https://community.atlassian.com/t5/Jira-Software-questions/Linking-tickets-created-using-branch-function/qaq-p/2680891#M1012468
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
removed comment, was able to get this to work with the suggestions. thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, I didn't have any issues parsing through the list with spaces. No need for brackets.
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.