Issue with last commented user field with jira toolkit plugin.

Scott Harman
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.
May 26, 2017

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

1 vote
Eric Lam
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 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.

0 votes
Thanos Batagiannis _Adaptavist_
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.
May 29, 2017

Hi Scott, 

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

Scott Harman
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.
May 29, 2017

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
TAGS
AUG Leaders

Atlassian Community Events