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.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
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...
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
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs