I want to create a custom URL from a field someone enters from a custom field. If the custom field (labeled Rule ID) is entered as 1000. I want the automation to populate a certain website (format would be something like: https://website.com/1000/fakewebsite) where the 1000 could be any number. How do I go about creating this automation in Jira?
Custom field entered (Rule ID) = 1000
then it auto populates a website = https://website.com/1000/fakewebsite
To create an automation rule in Jira that generates a custom URL based on the value of a custom field (e.g., "Rule ID"), follow these steps:
Steps to Create the Automation Rule:
Ensure You Have the Custom Field
Make sure the custom field (e.g., "Rule ID") is already created and available in the issue types where you want to use this automation.
Go to Automation Rules
Navigate to your project in Jira.
Go to Project Settings > Automation > Create Rule.
Set the Trigger
Choose a trigger that suits your needs, such as Field Value Changed or Issue Created, depending on when you want the URL to be generated.
Add a "Create Variable" Action
Use the Create Variable action to store the custom field value. Name the variable something like ruleId.
Set the variable to the value of the custom field:
Smart value: {{issue.customfield_1000}}
Replace customfield_1000 with the ID of your "Rule ID" custom field.
Add an "Edit Issue" Action
Use the Edit Issue action to populate another custom field where the generated URL will be stored.
Set the field's value using the following smart value:
https://website.com/{{ruleId}}/fakewebsite
This will replace {{ruleId}} with the actual value entered in the "Rule ID" field (e.g., 1000).
Save and Activate the Rule
Save the automation rule and activate it.
Example:
If the "Rule ID" field is set to 1000, the rule will automatically generate the URL https://website.com/1000/fakewebsite and populate the specified custom field with this URL.
Testing:
Create or update an issue where the "Rule ID" field is populated.
Verify that the URL is correctly generated and stored in the custom field as specified.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In terms of storing this value on the ticket you could use an automation rule such as below:
You could replace the action with "Edit issue" to put this into another field called "URL" or something else.
In terms of creating a website, you'd be looking at WebHooks and you'd need to discuss with your website vendor etc. on how this would work.
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.