Details
-
Bug
-
Resolution: Obsolete
-
Medium
-
None
-
4.3.4
-
4.03
-
Description
Steps to reproduce:
- Create an issue as user A (TST-1)
- Login using user B and make a comment into the issue TST-1 (commenter is user B)
- Retrieve the issue details using REST API and the result can be shown correctly. For example:
cychan@cychan-laptop:~$ curl -u admin:admin http://localhost:8080/rest/api/2.0.alpha1/issue/TST-1 {"expand":"html","self":"http://localhost:8080/rest/api/2.0.alpha1/issue/TST-1","key":"TST-1","fields":{"summary":{"name":"summary","type":"java.lang.String","value":"test1"},"timetracking": ... {"name":"components","type":"com.atlassian.jira.bc.project.component.ProjectComponent","value":[]},"comment":{"name":"comment","type":"com.atlassian.jira.issue.fields.CommentSystemField","value":[{"self":"http://localhost:8080/rest/api/2.0.alpha1/comment/10000","author":{"self":"http://localhost:8080/rest/api/2.0.alpha1/user?username=test","name":"test","displayName":"test"},"body":"testing the commenter","updateAuthor":{"self":"http://localhost:8080/rest/api/2.0.alpha1/user?username=test","name":"test","displayName":"test"},"created":"2011-07-21T15:27:40.000+0800","updated":"2011-07-21T15:27:40.000+0800"}]}},"transitions":"http://localhost:8080/rest/api/2.0.alpha1/issue/TST-1/transitions"}cychan@cychan-laptop:~$
- Delete the account of user B (the commenter link in TST-1 will be disappeared)
- Refresh the issue detail page of issue TST-1 in Internet Browser and no error message displayed in the log file
- Retrieve the issue details using REST API again and hit into error message. For example:
cychan@cychan-laptop:~$ curl -u admin:admin http://localhost:8080/rest/api/2.0.alpha1/issue/TST-1 {"errorMessages":["Internal server error"],"errors":{}}cychan@cychan-laptop:~$
- This error message is displayed in the log file:
2011-07-21 16:10:58,188 http-8080-2 ERROR admin 970x749x1 - 0:0:0:0:0:0:0:1 /rest/api/2.0.alpha1/issue/TST-1 [jira.rest.exception.ExceptionInterceptor] Returning internal server error in response java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ... Caused by: java.lang.RuntimeException: com.opensymphony.user.EntityNotFoundException: No user 'test' found at com.atlassian.jira.issue.comments.CommentImpl.getAuthorObject(CommentImpl.java:86)
Workaround:
Re-create the deleted user but remove his membership from all the groups so that it won't count towards the license limit and the user won't be able to login.
Suggestion:
The REST API should check if such user was deleted then no need to include them in the retrieved result.
Attachments
Issue Links
- copied to
-
JRADEV-13039 Loading...