Dear community,
I can't find how to implement in Automation for Jira an advanced smart value similar to this in JavaScript
{1: 'aaa', 2: 'bbb'}[x]
i.e. it's a simple mapping.
I know I can use if/else, but it will duplicate actions in the rule.
Any thoughts?
If you're using smart values for fields then they will take the format of {{issue.customfield_id}}. Are you using these in the advanced compare condition? Are there any error messages in the audit log which might be of use?
No, I'm not using custom fields. I need to determine a target project based on the source, something like this
{'projectX': 'projectY', 'projectA': 'projectB'}[{{issue.project.key}}]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is your trigger for the rule/in what context are you needing the source/trigger project? E.g. is it based on issues in separate projects being linked, where you're trying to find the trigger/destination projects of the issues being linked? Or are you moving issues from one project to another?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It doesn't matter, for example, events is happeing in project A and something has to be done in project B and I have several mapping pairs. I need a mapping to figure out a target project based on the source, e.g.
project1 → project2
projectA → projectB
That's it.
I'm not looking for workaround, I'm looking for a smart value that will allow me to do that. As far as I can see, Automation for Jira can't work with user-defined maps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Got it, I see what you mean now - it sounds like the mapping you are wanting is not really easily achievable in Automation for Jira, like you say, without using a bunch of IF statements
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.