Hey Atlassian Community ,
I want to automate a field by default value automatically when i select a field from dropdown(Suppose i have field named "x" and i have dropdown options to that field as "y , z " .. Now if i select x the feature i need is the value associated with y (assume "a") should by default come below it )
Hi @saiteja ameda ,
You can use an Automation Rule to automatically set field B based on the value of field A.
Just be aware that an Automation Rule can only trigger on events like 'Issue created' or 'Field changed', but it will not be able to manipulate the field while the user is still in the Create or Edit screen.
If you want to dynamically manipulate form fields on the screen while the user is still filling in the screen, you need to use Behaviours from ScriptRunner.
Assuming an Automation Rule meets your requirements, you can create an automation Rule with a setup such as:
If you have many options for field A, you would need to create many IF/ELSE blocks. In that case, it is better to create a Lookup Table, with a mapping of field A values to field B values.
Say you name your lookup table 'fruit' and the value for field A is 'banana' and you have mapped 'banana' to 'yellow' in your lookup table.
Then you can Edit the issue and set field B to the smart value
{{fruit.get("banana")}}
Which will set the value of field B to 'yellow'.
Hope that helps.
Have a nice day! Rik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.