Adding a field to a Screen tab throws java.lang.IndexOutOfBoundsException

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server と Data Center のみ - この記事は、サーバーおよびデータセンター プラットフォームのアトラシアン製品にのみ適用されます。



問題

An error is thrown in JIRA UI when trying to add a field to a Screen tab.

The JIRA Server was contacted but has returned an error response. We are unsure of the result of this operation.

atlassian-jira.log に次の出力が記録される。

2018-03-19 06:32:34,156 http-nio-18080-exec-22 ERROR USER 392x329039x5 USERA 10.207.101.159 /rest/api/2/screens/2/tabs/31307/fields [c.a.j.rest.exception.ExceptionInterceptor] Returning internal server error in response
java.lang.reflect.InvocationTargetException
.......
Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at com.atlassian.jira.issue.fields.screen.FieldScreenImpl.getTab(FieldScreenImpl.java:87)
at com.atlassian.jira.action.screen.AddFieldToScreenUtilImpl.getTab(AddFieldToScreenUtilImpl.java:114)
at com.atlassian.jira.action.screen.AddFieldToScreenUtilImpl.validate(AddFieldToScreenUtilImpl.java:49)
at com.atlassian.jira.rest.v2.issue.ScreensResource.addField(ScreensResource.java:415)
... 267 more

診断

It appears that the ArrayList return was missing the Tab for the affected Screen in which the user tries to add a field into. Gathering the below SQL result might provide further insights into what happened.

SELECT * FROM fieldscreentab INNER JOIN fieldscreen ON (fieldscreentab.FIELDSCREEN = fieldscreen.ID) WHERE fieldscreen.NAME = '<AffectedScreen>';

(info) Replace <AffectedField> with the correct affected field name.

原因

The cause is unclear at this point to why the Tab of the affected Screen is missing from the list. 

回避策

A workaround that can be done via the UI is to follow the following Steps:

  1. Create a new tab
  2. Add a field to this new tab
  3. Drag and drop the field from new tab to the affected tab

This should resolve the error, adding new fields to the affected tab after doing the above will work.


Last modified on Mar 22, 2018

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.