Hi,
We have a custom script running in a Issue Created script listener. We basically need to read the labels on an issue that has been created which we do by using:
LabelManager labelManager = ComponentAccessor.getComponent(LabelManager.class)
def labels = labelManager.getLabels(issue.id).collect{it.getLabel()}After updating the script it works as intended and it returns the labels that has been assigned to it on creation but this only works on the first issue created after updating the script. Any additional issues created just return an empty list of labels even though there is a label on the issue. I've checked the issue id and it is getting the correct issue everytime the script is run.
Is there something that needs to be reset or is their an easier way of getting the labels?
Thanks