Forums

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

Apply Script to user editable field

David Doria
Contributor
July 24, 2020

Is it possible to make a 'Select List (multiple choices)' field that a user can interact with but is also controlled by a script? For example, I want a parent issue to "inherit" the selections of a field of its children if it has any, but if it does not, then allow the user be able to edit the field as normal.

I looked at Behaviors, but those appear to apply only on "Screens". I have a constraint that I also want this field to be "live" in Structure, where there is no such "Screen" on which the Behavior would apply.

Is this possible?

Thanks,

David

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Adrien Low _ServiceRocket_
Community Champion
December 24, 2021

Hey @Wajahat Gul ,

If you issue will go from Unassigned to Assigned only once, perhaps you could try creating a custom listener that listens to the Issue Assigned event with the below script:-

def change = event?.getChangeLog()?.getRelated("ChildChangeItem")?.find {it.field == "assignee"}

if(change) {
if (change.oldstring == null && change.newstring != null) {
//Set Date here
}
}

The script will check if the Assignee was changed from Unassigned to a specific user and then setting the date.

Of course, if ever your issue goes back to Unassigned and then assigned again, the date will change again.

Hope this helps.

Regards.

TAGS
AUG Leaders

Atlassian Community Events