-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 9.5.0
-
Component/s: Fisheye Plugin
-
9.05
-
1
-
Severity 3 - Minor
Issue Summary
Creating a Crucible review from Jira using the "Create review for all commits" button will copy the Jira issue summary into the Crucible review title. They both (Jira issue summary and Crucible review title) have a max length of 255 characters. In theory the copy would never fail but the Jira Fisheye Plugin (v9.5.0) attempts to add the Jira issue key to the beginning of the Crucible review title. If the Jira issue summary is close to 255 characters it will exceed the max length of the Crucible review title when the Jira Fisheye Plugin attempts to add the Jira issue key to it.
This is reproducible on Data Center: ![]()
Steps to Reproduce
- Ensure that your Jira and Fisheye/Crucible instances have been successfully linked: Linking Crucible to Jira – Configuring an application link with Jira Software.
- Create a Jira issue using the following title:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat duis aute irure do.
The title contains 250 characters. - Now push a commit to one of the repositories currently linked to Fisheye/Crucible and include the Jira issue key (e.g. ATL-123) from step 2 in the commit message.
- After a minute or so you should see the Development section pop-up in your Jira issue with 1 commit. Once you click on the commit to expand its details two options will show up in the dialog:
- Create review for all commits
- Create review – this one shows up next to every commit message
- Choose the first option "Create review for all commits".
- You'll be redirected to Crucible to choose the project for the new review. Choose the project and click "Create review".
Expected Results
The Crucible review gets created and you are forwarded to the "Edit Review Details" screen to continue working on it.
Actual Results
An exception is thrown in the UI and inside the $FISHEYE_INST/var/log/atlassian-fisheye-YYYY-MM-DD.log file:
2023-01-19 08:31:57,793 WARN [qtp1078705341-223 ] org.eclipse.jetty.server.HttpChannel HttpChannel-handleException - /fisheye/json/cru/createDialog javax.servlet.ServletException: javax.servlet.ServletException: java.lang.IllegalArgumentException: The value 'SCRUM-11: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat duis aute irure do.' for the property 'name' is too long. It should have a maximum length of 255 ... Caused by: javax.servlet.ServletException: java.lang.IllegalArgumentException: The value 'SCRUM-11: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat duis aute irure do.' for the property 'name' is too long. It should have a maximum length of 255 ... at com.opensymphony.xwork.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:186) [xwork-1.2.5-atlassian-8.jar:?] at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) [xwork-1.2.5-atlassian-8.jar:?] at com.atlassian.xwork.interceptors.XsrfTokenInterceptor.intercept(XsrfTokenInterceptor.java:100) [atlassian-xwork-core-1.17.jar:?] at com.cenqua.fisheye.web.util.XsrfCheckInterceptor.intercept(XsrfCheckInterceptor.java:20) [fisheye.jar:?] at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) [xwork-1.2.5-atlassian-8.jar:?] at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) [xwork-1.2.5-atlassian-8.jar:?] at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190) [xwork-1.2.5-atlassian-8.jar:?] at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:116) [xwork-1.2.5-atlassian-8.jar:?] at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:274) [webwork-2.2.7-atlassian-37.jar:?] ... 206 more
Workaround
- Use the "Create review" option that shows up next to your commit messages inside the development panel when creating a review rather than the "Create review for all commits" option.
- This way the Jira Fisheye Plugin will not attempt to copy the Jira issue summary into the Crucible review title but the commit message. Commit messages tend to be shorter than 255 characters. Even if it exceeds the 255 characters the Jira Fisheye Plugin will trim the message down to 255 characters, and the review creation will not fail.
- The only caveat is that the Crucible review will be created and assigned a single commit only. You will have to add the rest of the commits you wish to review manually through the Edit Details > Add content button inside the Crucible review.