-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 9.13.0, 9.13.1, 10.3.4, 10.4.1
-
Component/s: Administration - Screens
-
9.13
-
1
-
Severity 3 - Minor
Issue Description
As per Jira 9.13.0 release notes, Jira 9.13.0 introduced a new feature allowing watchers to be added to an issue from the "Create Issue" screen.
As explained in the section Add watchers while creating issues of the release notes, to enable this feature, it is necessary to enable the dark feature com.atlassian.jira.initialwatchers.enabled.
By design, when this dark feature is enabled, the Watchers field should be added to all the "Create Issue" screens.
However, if the Assignee field is missing from the main tab of at least 1 "Create Issue" screen, the dark feature will fail to add the Watchers field to all the "Create Issue" screens (it might manage to add this field to some screens though). As a result:
- Some "Create Issue" Screens will be automatically added the Watchers field as illustrated below:

- Some "Create Issue" screens will be missing the Watchers field as illustrated below

Steps to replicate
There are 2 ways to replicate this bug.
Method 1
- Install Jira on any version from 9.13.0
- Open the configuration of 1 "Create Issue" screen
- Remove the Assignee field from this screen

- Enable the dark feature com.atlassian.jira.initialwatchers.enabled

- Open the configuration all the "Create Issue" screens in the whole Jira application and check if the Watchers field was added to them
Method 2
- Install Jira on any version from 9.13.0
- Open the configuration of 1 "Create Issue" screen
- Create a new tab
- Remove the Assignee field from the main tab, and add it to the new tab

- Enable the dark feature com.atlassian.jira.initialwatchers.enabled

- Open the configuration all the "Create Issue" screens in the whole Jira application and check if the Watchers field was added to them
Expected behavior
The Watchers field should be added to all the "Create Issue" screen in the whole Jira application.
Actual behavior
- The Watchers field is missing from all of some "Create Issue" screens
- Checking the Jira application logs, the error below will be thrown:
2025-03-05 15:52:09,297+0000 http-nio-8080-exec-3 url: /jira/secure/admin/SiteDarkFeatures.jspa; user: admin ERROR admin 952x2326x1 o143wk 172.29.215.252,172.50.0.2 /secure/admin/SiteDarkFeatures.jspa [c.a.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.jira.config.FeatureEnabledEvent@37339cdc] from the invoker [com.atlassian.event.internal.ComparableListenerInvoker@7f3db280] java.lang.RuntimeException: Index: 15, Size: 14. Listener: com.atlassian.jira.plugins.initialwatchers.InitialWatchersSetup event: com.atlassian.jira.config.FeatureEnabledEvent at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:53) at com.atlassian.diagnostics.internal.platform.monitor.event.EventSystemMonitor.invokeMonitored(EventSystemMonitor.java:105) at com.atlassian.diagnostics.internal.platform.monitor.event.MonitoredListenerInvoker.invoke(MonitoredListenerInvoker.java:38) at com.atlassian.event.internal.ComparableListenerInvoker.invoke(ComparableListenerInvoker.java:48) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:85) at com.atlassian.diagnostics.internal.platform.monitor.event.MonitoredEventDispatcher.dispatch(MonitoredEventDispatcher.java:36) at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:114) at com.atlassian.event.internal.LockFreeEventPublisher.publish(LockFreeEventPublisher.java:40) at com.atlassian.jira.config.feature.DefaultFeatureManager.changeSiteDarkFeature(DefaultFeatureManager.java:282) at com.atlassian.jira.config.feature.DefaultFeatureManager.enableSiteDarkFeature(DefaultFeatureManager.java:219) at com.atlassian.jira.web.action.admin.darkfeatures.SiteDarkFeatures.doExecute(SiteDarkFeatures.java:57) ... 1 filtered at com.atlassian.jira.web.action.JiraWebActionSupport.execute(JiraWebActionSupport.java:1382) ... 7 filtered at javax.servlet.http.HttpServlet.service(HttpServlet.java:623) ... 48 filtered at com.atlassian.servicedesk.internal.web.ExternalCustomerLockoutFilter.doFilter(ExternalCustomerLockoutFilter.java:55) ... 4 filtered at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:56) ... 7 filtered at com.atlassian.jira.plugin.mobile.web.filter.MobileAppRequestFilter.doFilter(MobileAppRequestFilter.java:59) ... 4 filtered at com.atlassian.jira.plugin.mobile.login.MobileLoginSuccessFilter.doFilter(MobileLoginSuccessFilter.java:54) ... 3 filtered at com.atlassian.diagnostics.internal.platform.monitor.http.HttpRequestMonitoringFilter.doFilter(HttpRequestMonitoringFilter.java:54) ... 8 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 48 filtered at com.atlassian.oauth2.scopes.web.ReadWriteScopeFilter.doFilter(ReadWriteScopeFilter.java:46) ... 3 filtered at com.atlassian.troubleshooting.thready.filter.AbstractThreadNamingFilter.doFilter(AbstractThreadNamingFilter.java:46) ... 21 filtered at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66) ... 1 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64) ... 16 filtered at com.atlassian.pats.web.filter.TokenBasedAuthenticationFilter.doFilter(TokenBasedAuthenticationFilter.java:82) ... 3 filtered at com.atlassian.oauth2.provider.core.web.AccessTokenFilter.doFilter(AccessTokenFilter.java:82) ... 26 filtered at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30) ... 5 filtered at com.atlassian.plugins.authentication.sso.web.filter.loginform.DisableNativeLoginAuthFilter.doFilter(DisableNativeLoginAuthFilter.java:55) ... 3 filtered at com.atlassian.plugins.authentication.basicauth.filter.DisableBasicAuthFilter.doFilter(DisableBasicAuthFilter.java:70) ... 3 filtered at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:221) at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.rteInvoke(ReentrantThreadLocalBasedCodeContext.java:136) at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.runOutOfContext(ReentrantThreadLocalBasedCodeContext.java:89) at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.runOutOfCustomerContext(CustomerContextServiceImpl.java:47) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:212) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:140) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:129) ... 4 filtered at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:37) ... 8 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 4 filtered at com.atlassian.troubleshooting.thready.filter.AbstractThreadNamingFilter.doFilter(AbstractThreadNamingFilter.java:46) ... 3 filtered at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36) ... 29 filtered at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25) ... 25 filtered at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:840) Caused by: java.lang.IndexOutOfBoundsException: Index: 15, Size: 14 at java.base/java.util.ArrayList.rangeCheckForAdd(ArrayList.java:756) at java.base/java.util.ArrayList.add(ArrayList.java:481) at com.atlassian.jira.issue.fields.screen.FieldScreenTabImpl$LayoutItems.add(FieldScreenTabImpl.java:230) at com.atlassian.jira.issue.fields.screen.FieldScreenTabImpl$LayoutItems.access$300(FieldScreenTabImpl.java:208) at com.atlassian.jira.issue.fields.screen.FieldScreenTabImpl.addFieldScreenLayoutItem(FieldScreenTabImpl.java:133) at com.atlassian.jira.plugins.initialwatchers.InitialWatchersSetup.lambda$addCustomField$1(InitialWatchersSetup.java:115) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276) at java.base/java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1242) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) at com.atlassian.jira.plugins.initialwatchers.InitialWatchersSetup.addCustomField(InitialWatchersSetup.java:112) at com.atlassian.jira.plugins.initialwatchers.InitialWatchersSetup.onFeatureEnabled(InitialWatchersSetup.java:85) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:569) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42) ... 328 more
Workaround
N/A