Goal:
I would like to have a behaviour on change script that updates the custom field of subtasks to the value that the parent updated to. This is a free-text field entitled "Issue".
What I have tried:
Created a behaviour script for the Issue field, set to required (under Add Ons > Behaviours > [this project]). So essentially this should run whenever that field is updated.
def subTasks = issue.getSubTaskObjects()
def issueValue = getFieldById(getFieldChanged())
subTasks.each {
it.getFieldByName("Issue").setFormValue(issueValue.getFormValue())
}
*this is the entirety of the code in the script for the Issue custom field on change listener
This produces no results.
When I check the atlassian logs, there are no errors shown, either.
Thanks in advance for any insight you can offer.
I'm not sure but I think you should use setCustomFieldValue.
it.setCustomFieldValue(issueValue.getFormValue())
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.