Issue Summary
When exporting SLA data to CSV, Jira uses the goalTimeUnits and remainingTimeInDaysAndMillis values from the completeSLAData in the SLA timeline. However, these were only implemented on Jira Service Desk 3.9 (released along with Jira Software/Core 7.6).
As a consequence, issues that were closed before the upgrade to Jira Service Desk 3.9 do not have these values stored, which cause Jira to calculate those during the export every time the issue is exported.
Environment
- Jira Service Desk 3.16.1+
Steps to Reproduce
On Jira Service Desk older than version 3.9
- Create many SLA goals in a project.
- Generate data to have multiple issues with SLA data.
- Upgrade Jira Service Desk to version 3.16.1 or later (
JRASERVER-62457). - Try to export those issues to CSV, including the SLA values in the export.
Expected Results
The CSV file should be quickly exported
Actual Results
It may take several minutes for the CSV file to be exported, depending on the number of issues, and of SLA goals and fields.
If thread dumps are taken during the CSV export, Jira should be processing GoalMatcherImpl across multiple dumps. E.g.:
"http-nio-8080-exec-43 url:/sr/jira.issuev...hRequest-38800.csv username:myuser" #30609 daemon prio=5 tid=0x00007f7c3c2a4800 nid=0x7cff runnable [0x00007f7ab2eb0000] java.lang.Thread.State: RUNNABLE at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:83) at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131) at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:166) at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:239) at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:209) at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:57) at org.apache.lucene.search.MultiTermQueryWrapperFilter.getDocIdSet(MultiTermQueryWrapperFilter.java:120) at org.apache.lucene.search.ConstantScoreQuery$ConstantWeight.scorer(ConstantScoreQuery.java:139) at org.apache.lucene.search.BooleanQuery$BooleanWeight.scorer(BooleanQuery.java:298) at org.apache.lucene.search.BooleanQuery$BooleanWeight.scorer(BooleanQuery.java:298) at org.apache.lucene.search.BooleanQuery$BooleanWeight.scorer(BooleanQuery.java:298) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:524) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:320) at com.atlassian.jira.index.DelegateSearcher.search(DelegateSearcher.java:132) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.getHitCount(LuceneSearchProvider.java:197) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.searchCountOverrideSecurity(LuceneSearchProvider.java:140) at sun.reflect.GeneratedMethodAccessor1305.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy486.searchCountOverrideSecurity(Unknown Source) at sun.reflect.GeneratedMethodAccessor1305.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy3837.searchCountOverrideSecurity(Unknown Source) at com.atlassian.servicedesk.internal.sla.goal.GoalMatcherImpl.isMatching(GoalMatcherImpl.java:103) at com.atlassian.servicedesk.internal.sla.goal.GoalMatcherImpl.lambda$getMatchingGoal$3(GoalMatcherImpl.java:74) at com.atlassian.servicedesk.internal.sla.goal.GoalMatcherImpl$$Lambda$2729/1813578904.test(Unknown Source) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) at java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1812) at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126) at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464) at com.atlassian.servicedesk.internal.sla.goal.GoalMatcherImpl.getMatchingGoal(GoalMatcherImpl.java:75) at com.atlassian.servicedesk.internal.sla.goal.GoalCalculationServiceImpl.getCalculatorFromTimeMetric(GoalCalculationServiceImpl.java:167) at com.atlassian.servicedesk.internal.sla.goal.GoalCalculationServiceImpl.getRemainingTimeUnitsForCompletedGoal(GoalCalculationServiceImpl.java:109) at com.atlassian.servicedesk.internal.sla.goal.view.GoalViewServiceImpl.getCompleteInformation(GoalViewServiceImpl.java:417) at com.atlassian.servicedesk.internal.sla.goal.view.GoalViewServiceImpl.getLastCycleInfo(GoalViewServiceImpl.java:385) at com.atlassian.servicedesk.internal.sla.goal.view.GoalViewServiceImpl.getGoalCycleInformation(GoalViewServiceImpl.java:352) at com.atlassian.servicedesk.internal.sla.goal.view.GoalViewServiceImpl.getGoalSummaryView(GoalViewServiceImpl.java:288) at com.atlassian.servicedesk.internal.sla.goal.view.GoalViewServiceImpl.getGoalSummaryView(GoalViewServiceImpl.java:282) at com.atlassian.servicedesk.internal.sla.customfield.SLACFType.getRepresentationFromIssue(SLACFType.java:413) at com.atlassian.jira.issue.export.customfield.DefaultCsvIssueExporter.getFieldExportRepresentationForCustomField(DefaultCsvIssueExporter.java:145) at com.atlassian.jira.issue.export.customfield.DefaultCsvIssueExporter.getFieldExportRepresentation(DefaultCsvIssueExporter.java:124)
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available
- links to
[JSDSERVER-6458] Exporting issues with SLAs to CSV is slow
UIS | Original: 1 | New: 2 |
UIS | Original: 2 | New: 1 |
Labels | New: ril |
Remote Link | New: This issue links to "Internal ticket (Web Link)" [ 955138 ] |
Support reference count | Original: 6 | New: 7 |
UIS | Original: 5 | New: 2 |
Support reference count | Original: 5 | New: 6 |
UIS | Original: 2 | New: 5 |
Support reference count | Original: 4 | New: 5 |
Helped to me recalculation for all old tickets by that instructions https://confluence.atlassian.com/jirakb/missing-or-corrupted-sla-data-in-jira-service-management-828790603.html