Groovy errors

Andrew Striletskyi February 16, 2018

Hello everyone. In this lines I have an error . First error in getChangeItemsForField I see "cannot find matching method" and even I can't find toString method. How to fix it

 def assignedAt = ComponentAccessor.ChangeHistoryManager.getChangeItemsForField(results.issues.get(0),"assignee").find {
it.toString == agent.name
}?.getCreated() as Timestamp

 

1 answer

1 vote
Juan Manuel Ibarra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 16, 2018

Hi! You skip the "()" after "it"

 

 def assignedAt = ComponentAccessor.ChangeHistoryManager.getChangeItemsForField(results.issues.get(0),"assignee").find {
it.toString() == agent.name
}?.getCreated() as Timestamp

 Regards

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events