Follow this pattern
Add validator to customfield1 and in the groovy code set the value of customfield2 to the value of customfield1
Also you can use this dicussion for reference (except the "if" statements)
Here's a sample code (add it to customfield1)
FormField cf1 = getFieldById(fieldChanged) FormField cf2 = getFieldByName("CustomField2") cf2.setFormValue(cf1.getValue())
Note that in the UI you'll not see immediate update of customfield2, but it will be updated if you click anywhere on the form or just click update to save the issue changes.
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot