Have to create automation rule to update the custom field

V N Raju Raju
Contributor
July 14, 2023

Hi, 

I have to write an automation rule to update the custom field (Batch) in Release Issue type values with the week and year numbers based on the issue release date and when I linked a single story ticket to the Release ticket Extention will be SA. If I linked two or more story tickets to the Release ticket Extention will be COM

if my  Release issue type release date is 18-July-2023 then the Batch custom field should be updated as 

Y23_Batch_29_SA (Single Story linking to the Release ticket)

Y23_Batch_29_COM (Multiple Stories linking to the Release ticket)

 

Kindly help me with this.

 

Thanks & Regards

Raju

 

 

 

1 answer

1 vote
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 14, 2023

Hello @V N Raju Raju 

What events in Jira would you want to trigger setting the field? 

Where are you getting the information about the Year and Week number for the release date of the Release issue?

Have you tried to construct this automation? If so, show us what you have so far.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 14, 2023

Hi @V N Raju Raju 

Adding to Trudy's answer...If you have not started your rule yet, please review these documentation sources to create your rule, and if you have challenges, post images of your rule and audit log so the community can help.

Information for version fields in issues: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--issue.fixVersions--

How to format the dates using the format() function: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#--

Kind regards,
Bill

Like Trudy Claspill likes this
V N Raju Raju
Contributor
July 15, 2023

Hi @Trudy Claspill@Bill Sheboy

 

I have created the automation rule as attached screenshots. Kindly review these screenshots and help me. Previously I wrote the automation rule as creating the version and updating the version release date based on the issue Planned release date field. depends on that version I have created this Batch field automation rule.

 

Is it required to create an API to update the Version related smart values into any custom field?

 

Thanks & Regards

RajuBatch Release Year.pngBatch Release Years Number.pngBatch Release Week of the Year.pngBatch Field Update.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2023

The {{version}} smart value is only available for the version-related triggers: version created, updated, or released, as described here: https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Version-created--updated--released

Some questions to help:

  • Does the issue created (that triggers your rule) have a Fix Version assigned?
  • Or, are you also trying to identify the release version to use based on data in the created issue?

If you have the Fix Version assigned, please use that smart value to get data for your custom field, as described here: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--issue.fixVersions--

If you instead want to find the release version based on issue data, then you will need to call the REST API with a web request to get all possible versions in the project, and the filter down to the one you want with smart value, list filtering, as described here: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588

Once you have the data, you can use the smart values to directly edit the custom field by entering the smart values for the field value.

Like Trudy Claspill likes this
V N Raju Raju
Contributor
July 16, 2023

Hi @Bill Sheboy 

 

The Release version is created by issue data Which I provided on a few fields at the time of the Release IT Ticket creation. The shared data is very helpful to me to create the automation rule. I will get back here if I face any blockers to write the automation rule.

 

Thanks & Best Regards

Raju

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events