I want to set the epic link to an issue key from an other form field (scriptrunner issue picker).
This is no problem so far, but how do I clear the epic link form field, if the other form field is cleared? Empty string, -1 and null are not working.
def epicLink = getFieldByName('Epic Link')
def issuePicker = getFieldByName('Issue Picker')
def issueKey = issuePicker.getValue()
if (issueKey) {
epicLink.setFormValue(issueKey)
}
else {
epicLink.setFormValue('')
}I thought the approach to use a issue picker field, would be a solution to my original problem.
Is it possible to restrict the epics I can choose in epic link.
I want to restrict the choices depending on the input on that issue. With the issue picker field I found a solution to do that. But I don't want epic link to remain, when I clear issue picker field.
Probably I could do it with the issue picker field and a listener to watch all changes of that issue picker field, but that solution is hard to service if anything goes wrong or needs to be changed.