Auto fill 2 custom fields based on the value of a third custom field which is a checkbox

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 checkbox with only two checkboxes Yes/No

If val(C)==yes the A and B should get values automatically where A gets the user who is doing the transition and B is the current date

If val(C)==no the transition should not happen.

How can I achieve this? I looked at a bunch of plugins but could not conclude anything useful.

Thanks in advance.

2 answers

1 accepted

So for c=no add a condition or validator in the workflow depwnding on how exactly you want it to work. For c=yes you can use script runner to set the values if these two fields via groovy script in a scripted postfunction

Hi Boris,

Thanks for your reply. Can we do it in some other way than the groovy script? Is there any other plugin available?

0 vote
Mizan Community Champion Apr 08, 2014

You need suite utilities plugin . It has the workflow condition which can check whether val(C)=yes and on that transition you can use the update customfield postfunction provided by this plugin

Hi Mizan,

Appreciate your response. The value of custom field C is set during the transition and never before that. Infact this is the create issue screen. So in the create issue screen the field C is placed, if the user selects yes fields A and B should get values automatically. These fields are not present on the create issue screen. Thanks.

Mizan Community Champion Apr 08, 2014

In that case the solution i can think of is writing a groovy postfunction which will check for the value and based on that set the value to the other customfield.

This will be very simple you can search it and you will find similar scripts on Answers and the script runner documentation

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

764 views 2 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you