I have a similar question to https://community.atlassian.com/t5/Automation-questions/Create-clone-issue-when-project-name-is-smart-value-dynamic/qaq-p/1494344. I'm using Automation for Jira to create new items and dynamically selecting the board(s) on which new item(s) should be made using a custom labels field. That looks like this:-
The comment action is only for debugging purposes which confirms that the smart value does indeed contain the key of a valid project. However, when the rule attempts to create an item in this project, the Create Issue action returns the following error-
Is this a bug in the the way the automation is implementing the Create Issue API method? I'm assuming that the Create Issue action would default to trying to create with "key" : {{productSuite}} instead of "id" : {{productSuite}} if the value is non-numeric but is this actually the case? I tried using the project's ID instead and this successfully created the item.
So {{productSuite}} equates to a custom field with the Keys of certain other Projects as it's values, is that right?
Then you want the automation to use whatever is in that field as the destination project of the Bug the automation is creating....I'm I still on the right path here??
If so, wouldn't be {{issue.productSuite}} or {{triggerIssue.productSuite}} ?
{{productSuite}} is a variable produced by the Advanced Branching branch that the actions are being executed within-
The {{issue.PRODUCT SUITE}} field is a custom label field. I'm branching like this so that for each label, the branch will be executed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a really hacky workaround for this which really makes me think that this is a bug in the way the automation is implemented. By using the Lookup Issues action I can find items using the project key and then use the project id from a lookupissue to create an item.
I don't really like this solution though!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One extra note on this- when Lookup Issues returns multiple items, the resultant string constructed in {{lookupIssues.project.id}} is a comma separated list of the id of all of the items. Instead, I used {{lookupIssues.first.project.id}} which functions correctly regardless of how many items exist in the target project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there,
This looks like a tricky problem that we’ll need to look at more closely. It’s best if you raise this problem through the support portal at https://getsupport.atlassian.com/ and we can get a closer look.
Cheers,
Allen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Allen,
Having investigated this further, I'm fairly sure there is an issue along the following lines-
ie. Creating an issue from key is not possible in the Create Issue method within Automation for Jira.
I am not a site administrator in my org so cannot raise support requests to Atlassian. Does this need to follow that process in order to be raised to a backlog for the product? I don't expect that this is a large enough concern that it will be fixed so I am already looking at ways to work around the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nice one @[deleted] that makes sense.
You could likely workaround this by If/else statements around each potential result from your variable and then put each corresponding Project key in place in the Create issue action.
But that sounds a bit tedious :-(
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.