Облако, Сервер и Центр обработки данных - статья применима ко всем платформам. Поддержка продуктов для серверов завершилась 15 февраля 2024 года.
Эта ошибка может проявляться в различных сценариях, включая:
При проверке обязательных полей для создания задачи через REST API возникает ошибка:
<JIRA Base URL>/rest/api/2/issue/createmeta?projectIds=<project id>&expand=projects.issuetypes.fields
Ошибка:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<status>
<status-code>500</status-code>
<message>Duplicate key com.atlassian.jira.rest.v2.issue.FieldMetaBean@174a0eaf</message>
<stack-trace>
java.lang.IllegalStateException: Duplicate key com.atlassian.jira.rest.v2.issue.FieldMetaBean@174a0eaf
at java.util.stream.Collectors.lambda$throwingMerger$0(Collectors.java:133)
at java.util.HashMap.merge(HashMap.java:1253)
...
</stack-trace>
</status>
Ошибка может проявляться при доступе к странице конфигурации настраиваемых полей или при редактировании экрана.
Пример ошибки в логах:
20-05-29 13:18:24,736 http-nio-8080-exec-7 ERROR admin 798x1632x2 1b7ddq4 127.0.0.1 /rest/api/2/customFields [c.a.j.rest.exception.ExceptionInterceptor] Returning internal server error in response
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
...
Caused by: java.lang.IllegalStateException: Duplicate key com.atlassian.jira.issue.fields.screen.FieldScreenLayoutItemImpl@d8014b05
Могут возникнуть ошибки, связанные с системными полями, такие как:
2023-03-10 16:55:01,396-0500 http-nio-8080-exec-13 url: /secure/admin/ViewSystemFields.jspa; user: admin ERROR admin 1015x10612704x7 12dxhmp 127.0.0.1 /secure/admin/ViewSystemFields.jspa [o.a.c.c.C.[Catalina].[localhost].[/]] Unhandled exception occurred whilst decorating page com.google.template.soy.tofu.SoyTofuException: In 'foreach' command {foreach $systemField in $systemFields}{call .sytemFieldsTableRow}{param systemField: $systemField /}{/call}{/foreach}, the data reference does not resolve to a SoyList (encountered type com.google.template.soy.data.restricted.UndefinedData). at JIRA.Templates.Admin.Systemfields.systemfieldsPage(Unknown Source) at com.google.template.soy.tofu.internal.BaseTofu.renderMainHelper(BaseTofu.java:369) ...
Все версии Jira Core 7.x и 8.x.
Выполните следующий SQL-запрос для поиска дублированного поля в экране:
select f.name, i.fieldidentifier, count(*)
from fieldscreen f, fieldscreenlayoutitem i, fieldscreentab t
where f.id = t.fieldscreen
and i.fieldscreentab = t.id
group by f.name, i.fieldidentifier having count(*) > 1;
Пример результата:
name | fieldidentifier | count
SSD: Scrum Default Issue Screen | assignee | 2
Поле появляется на экране более одного раза, возможной причиной может быть обновление плагина Xray до версии 6.5.
delete from fieldscreenlayoutitem where id = <duplicate_id>;
select f.name, i.fieldidentifier, max(i.id)
from fieldscreen f, fieldscreenlayoutitem i, fieldscreentab t
where f.id = t.fieldscreen
and i.fieldscreentab = t.id
group by f.name, i.fieldidentifier having count(*) > 1;
delete from fieldscreenlayoutitem where id in (select max(i.id) as deleteme
from fieldscreen f, fieldscreenlayoutitem i, fieldscreentab t
where f.id = t.fieldscreen
and i.fieldscreentab = t.id
group by f.name, i.fieldidentifier having count(*) > 1);