Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Auto fill user picker and date custom fields depend upon select list single custom field.

Rajiv Ranjan
Contributor
July 12, 2020

Hi All,

I have three custom fields A, B, and C. 

A is a user picker field, B is a Date Picker field and C is a select list single type with 3 values.

When changing the custom field 'C' from "abc" to "xyz"  field "A" and B should automatically get filled where A gets the user who is changing field C and B will fill up with current date&time

When changing the C field from "xyz" to any other clear those (A & B) fields.

Help me to achieve this? we have Jira version 8.5 and Scriptrunner v5.6.14.1-p5

Thanks in advance.

1 answer

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 16, 2020

Hello @Rajiv Ranjan

Thank you for reaching out and for the clear description of what you are trying to achieve.

I see your question is tagged as Jira Cloud. Is that the environment you are using?

If that's correct, you will be able to achieve the scenario you are looking for by creating two automation rules and using smart values to map the values for the fields. These would be the exact steps:

  1. Navigate to your Project > Project settings > Automation > Click to create a new rule
  2. Create a rule to update the custom field A (With the user that triggered the rule) and B (With the current date) when the custom field C is updated with "xyz", using the rule below as an example.
    P.S: As I don't have the custom fields you mentioned, I used the Select list (as C), test User picker (A), and test Date picker (B):

    Screen Shot 2020-07-16 at 13.16.45.png

  3. Create another rule to clear the fields A and B when the value selected for C is different from "xyz":
    Screen Shot 2020-07-16 at 13.21.25.png

Let us know if you have any questions.

Rajiv Ranjan
Contributor
July 16, 2020

@Petter Gonçalves .

Thanks for the information you provided, but this is not relevant to me because we are using Jira-Server v8.5.

Sorry for the confusion. 

Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 17, 2020

Hello @Rajiv Ranjan

Thank you for confirming.

Anyway, the same steps provided above can be achieved in Jira Server by installing the app Automation for Jira.

Feel free to try the app for free if that's an option for you.

P.S: The free version of this app has some limitations, so you will need to check if that would work for you or if you would need the paid version.

Rajiv Ranjan
Contributor
July 17, 2020

@Petter Gonçalves 

We already have ScriptRunner paid plugin installed so looking for the script.

Like Ryan Robert Easton likes this

Suggest an answer

Log in or Sign up to answer