Need help with Script Runner to automate setting a value in a custom field based on a custom field

Kent Chiu December 30, 2020

Hello,

Could you please help me on how to start using Script runner for our JIRA issue automation?

I am currently evaluating Script Runner to do automation to set a value in the JIRA issue based on a condition in another custom field.

The following is one of the scenarios:

Project: RP

Issuetype: RP

Custom field#1: Option list single selection (A, B, or C)

Custom field#2: Date time stamp

We would like to automate using Script Runner to do the following:

1. When the user edits Custome field#1 to the value B or C, the user requires to enter a timestamp in Custom field#2.

or

2. When the user edit Custom field#1 to the value B or C, automatically set the current time in Custom field#2.

I am trying to find some documentation or an example to do the above from the Script Runner documentation but unsuccessful. Could you please confirm if Script runner will be able to do the intended usage functionality?

We are using JIRA Software Server (not Cloud version)

Thank you,

Kent

1 answer

0 votes
Jussi Niutanen December 31, 2020

Hi Kent,

I use Jira Cloud at the moment. However, it seems that smart values apply to Jira servers as well.

You might be able to create an automation rule that is executed when the specific values are selected in the custom field#1. Maybe the automation can add timestamp automatically to the custom field#2. 

Here is some documentation

https://support.atlassian.com/jira-software-cloud/docs/what-are-smart-values/

https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/

I hope this helps and happy new year :)

Best,

Jussi

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events