How to link a custom field with the 'Prompt Action' input with manual triggers in Jira Automation
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
In JIRA Automation, when you configure a rule with a Manual trigger, you can select "Prompt for input when this rule is triggered" to start configuring input fields.
These fields will then be displayed to users when they trigger the rule. This allows you to gather information from your team members before the rule runs.
We do not have a direct way to link a custom field with the Manual trigger 'Prompt action'. The fields that are created within the Prompt are different from the actual Custom fields.
Solution
The below example explains how to link a User custom field to prompt for an input when running the automation rule.
- Create a custom field called Single Choice User (the type of the custom field is Single Choice)
Important Note
To create this custom field, follow the steps mentioned in the document to Create Custom field
2. Create the automation rule with a Manual trigger.
When selecting Dropdown (Single choice) in the Add field section, you will be prompted to fill the name of the custom field.
3. Please make sure to provide the same name as the custom field that is in use.
4. Make sure that the options of the custom field in the prompt action are same as the options in the actual custom field Single Choice User.
5. Next,save the custom field as a Variable name. For eg, use customfieldvariable. which can be accessed by {{userInputs.customfieldvariable}}
6. Add an Edit Issue action and select the Single Choice User field as shown below
7. Add a smart value to access the variable that was created before. Variable {{userInputs.customfieldvariable}}
will fetch the value at the time of User input's during the Prompt action.
8. Save and Turn on the Automation rule.
9. Create a test ticket and click on the Actions tab and click the Automation rule in question.
10. Automation rule will now prompt for user Inputs. The options visible in the screen are same as the custom field.
11. Automation rule will be executed and will update Jira's custom field with the value chosen.
12. Automation audit log displays the Log action output as shown below
Note
- If the options in the custom field do not match the options specified in the Automation rule's prompt action, then the rule will not work as per the expectation.
- In this instance, we described an example of a single choice field to link it with the automation's prompt action field. There might be cases where not all custom fields will support this functionality. Please contact Atlassian Support for further assistance.