Hi team,
I've been a reader on this fantastic forum on a lot of my automations, but now I need help which I couldn't find by googling away.
I have a case where I'm storing apiTokens as project keys (entity properties) for every repo we are responsible for. We don't have Bitbucket premium, so no project keys I'm afraid, so that's why we need keys for every repo.
On a workflow, I want to get the apiKey for the repository associated with the issue (yet again, an entity property on issue level).
I'm on the last step of my workflow, and I want to get the Repo Api Token for a certain {{repository}} based on the {{webResponse.body}} of my call to get Project Entities. Are you with me still?
So basically I'm creating a new variable where the path to access it is
{{webResponse.body.value.{{repository}}}}
Apparently JIRA Automation is not happy with this and mostly evaluates the whole thing to
}}
I could, of course, store the repo api key as an issue entity property, but I wanted to keep it central.
Help?
Hi @Paulo Sebastião -- Welcome to that Atlassian Community!
Although it would be interesting, and quite risky, if automation rules supported dynamic smart value expressions, they do not.
What you could do instead is use your variable to build a regular expression and then use the match() function, passing that expression as the parameter, to get the data needed.
When using this technique, some things to note:
Kind regards,
Bill
Hi @Paulo Sebastião,
Welcome to Atlassian Community!
Based on the format my guess is that you get multiple repositories back in the web response correct? In that case you would have to use the Advanced branching so that you can iterate over the returned result.
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.