Issue with last commented user field with jira toolkit plugin.

Hi guys - I've got an issue I've just discovered with this field - it doesn't support renamed users, and basically just bombs out of whatever is doing the update.

Sample output - looks like the issue is triggered by the plugin, but it's only been noticed after we've been running this for a few months.

Timing
Time (on server): Fri May 26 2017 20:09:12 GMT+1000 (AUS Eastern Standard Time)

The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.

 

2017-05-26 20:09:04,616 DEBUG [s-a-m.SupportListener]: Start debug - Region and Country Listener...
2017-05-26 20:09:04,616 DEBUG [s-a-m.SupportListener]: scriptrunner(scriptrunner)
2017-05-26 20:09:04,616 DEBUG [s-a-m.SupportListener]: **************
2017-05-26 20:09:04,616 DEBUG [s-a-m.SupportListener]: ISSUE Key: INC-42255
2017-05-26 20:09:04,616 DEBUG [s-a-m.SupportListener]: **************

2017-05-26 20:09:08,804 DEBUG [s-a-m.SupportListener]: Country Lookup: NEW ZEALAND Support Region: APAC C&S
2017-05-26 20:09:08,804 DEBUG [s-a-m.SupportListener]: trying to set country field: NEW ZEALAND was : NEW ZEALAND
2017-05-26 20:09:08,804 DEBUG [s-a-m.SupportListener]: trying to set region field: APAC C&S- was: APAC C&S

2017-05-26 20:09:11,788 DEBUG [s-a-m.SupportListener]: Issue Serial: null
2017-05-26 20:09:12,085 DEBUG [s-a-m.SupportListener]: Region Field Debuggering End...

2017-05-26 20:09:12,335 ERROR [runner.AbstractScriptListener]: *************************************************************************************
2017-05-26 20:09:12,335 ERROR [runner.AbstractScriptListener]: Script function failed on event: com.atlassian.jira.event.issue.IssueEvent, file: <inline script>
com.atlassian.jira.exception.DataAccessException: com.atlassian.jira.issue.customfields.impl.FieldValidationException: User 's******v' was not found in the system.
at com.atlassian.jira.issue.fields.ImmutableCustomField.updateIssue(ImmutableCustomField.java:1042)
at com.atlassian.jira.bc.issue.DefaultIssueService.updateIssueFromFieldsWithoutScreenCheck(DefaultIssueService.java:850)
at com.atlassian.jira.bc.issue.DefaultIssueService.updateIssueFromFields(DefaultIssueService.java:803)
at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndUpdateIssueFromFields(DefaultIssueService.java:684)
at com.atlassian.jira.bc.issue.DefaultIssueService.validateUpdate(DefaultIssueService.java:286)
at com.atlassian.jira.bc.issue.IssueService$validateUpdate.call(Unknown Source)
at Script60.run(Script60.groovy:296)
Caused by: com.atlassian.jira.issue.customfields.impl.FieldValidationException: User 's***********v' was not found in the system.
at com.atlassian.jira.issue.customfields.converters.UserConverterImpl.getUser(UserConverterImpl.java:50)
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
at com.sun.proxy.$Proxy538.getUser(Unknown Source)
at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136)
at com.sun.proxy.$Proxy538.getUser(Unknown Source)
at com.atlassian.jira.toolkit.customfield.AuthorOfLastUpdateOrCommentCFType.getSingularObjectFromString(AuthorOfLastUpdateOrCommentCFType.java:55)
at com.atlassian.jira.issue.customfields.impl.CalculatedCFType.getValueFromCustomFieldParams(CalculatedCFType.java:65)
at com.atlassian.jira.issue.fields.ImmutableCustomField.updateIssue(ImmutableCustomField.java:1038)
... 6 more

** Also - can't seem to log an issue against the plugin since the community upgrade

2 answers

This widget could not be displayed.
Eric Lam Atlassian Team Oct 31, 2017

Hi @Scott Harman, this bug now been resolved in the Jira Toolkit Plugin from version v0.35.14. Please update to the latest version of this add-on through Jira Administration » Add-Ons » Manage add-ons to resolve this issue.

This widget could not be displayed.

Hi Scott, 

Is this one of the Script Runner built in post functions ? Or is it a custom one ?

Hey Thanos - it's a custom listener, but the fault was with the toolkit plugin, AuthorOfLastUpdateOrComment - I've modified the field to be a user picker field, then simply set the user in that value (I'm using a custom user to modify all the fields so we don't have to grant the user edit permissions) so it actually gives us better metadata this way.

 

The toolkit plugin basically bombs with any user who has been renamed.

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

513 views 3 18
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you