Uploaded image for project: 'Xporter for Jira'
  1. Xporter for Jira
  2. XPORTER-3928

When exporting afield from the add-on SLA Powerbox, it works in single export but it fails in bulk exports

    XporterXMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Medium
    • Resolution: Won't Fix
    • 6.9.3
    • None
    • Xporter Engine
    • None
    • Engine Backlog
    • UNCOVERED

    Description

      Description

      When exporting afield from the add-on SLA Powerbox, it works in single export but it fails in bulk exports.

      Pre-conditions

      1. Install SLA Powebox
      2. Configure it, following the steps shown on gif: SLA Powerbox Configuration example.gif
      3. Upload template Client_Template_updated.xlsx

      How to reproduce

      1. Go to a Test, verify the field presence and proceed to the export with the template attached

       

      2. Verify the exported file - it's OK

       

       

      3. Go to the Search for Issues page, add the JQL issuekey=CALC-123, and add the respective columns SLA 1 and SLA 2:

       

      4. Export in bulk mode and check the file - it's OK

       

       

      5. Add another issue to the JQL: issuekey in (CALC-123, CALC-321

       

      6. Export in bulk and verify the result - it's not ok!!

       

       

      In the logs, we see these errors:

      2022-01-06 11:35:04,976+0000 Xporter-fieldmapper-da0cfa1ebb3a483db973b3da12d2671c-1 DEBUG admin 695x22110x1 bix7v3 0:0:0:0:0:0:0:1 /rest/jiraxporter/1.0/export/ [c.x.j.manager.impl.XporterFieldRetrieverImpl] Time to Load custom field: 02022-01-06 11:35:04,976+0000 Xporter-fieldmapper-da0cfa1ebb3a483db973b3da12d2671c-1 DEBUG admin 695x22110x1 bix7v3 0:0:0:0:0:0:0:1 /rest/jiraxporter/1.0/export/ [c.x.j.manager.impl.XporterFieldRetrieverImpl] Time to Load custom field: 02022-01-06 11:35:04,976+0000 Xporter-fieldmapper-da0cfa1ebb3a483db973b3da12d2671c-1 ERROR admin 695x22110x1 bix7v3 0:0:0:0:0:0:0:1 /rest/jiraxporter/1.0/export/ [c.x.jiraxporter.mapping.c] Error retrieving field SLA 1.com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Incorrect usage of JIRA/lucene search API. You can only create/use: ManagedIndexSearcher inside a context (request or Jira-Thread-Local). Check: JiraThreadLocalUtils for details. at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2050) at com.google.common.cache.LocalCache.get(LocalCache.java:3952) at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974) at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958) at com.coresoftlabs.sla_powerbox.service.ServiceSlaGoalUtilsImpl.getMatchingGoalItem(ServiceSlaGoalUtilsImpl.java:91) at com.coresoftlabs.sla_powerbox.field.slametric.SlaMetricCustomField.getValueFromIssueWithoutCalculatingTime(SlaMetricCustomField.java:375) at com.coresoftlabs.sla_powerbox.calculate.manage.SlaCustomFieldCalculateManagerImpl.getSlaCustomFieldModel(SlaCustomFieldCalculateManagerImpl.java:159) at com.coresoftlabs.sla_powerbox.calculate.manage.SlaCustomFieldCalculateManagerImpl.getCalculatedSlaModel(SlaCustomFieldCalculateManagerImpl.java:85) at com.coresoftlabs.sla_powerbox.calculate.service.SlaCustomFieldCalculateServiceImpl.getSlaModelForIssueValue(SlaCustomFieldCalculateServiceImpl.java:51) at com.coresoftlabs.sla_powerbox.field.slametric.SlaMetricCustomField.getValueFromIssue(SlaMetricCustomField.java:355) at com.coresoftlabs.sla_powerbox.field.slametric.SlaMetricCustomField.getValueFromIssue(SlaMetricCustomField.java:68) at com.atlassian.jira.issue.fields.ImmutableCustomField.getValue(ImmutableCustomField.java:354) at com.atlassian.jira.issue.DocumentIssueImpl.getCustomFieldValue(DocumentIssueImpl.java:350) at com.xpandit.jiraxporter.mapping.e.a(Unknown Source) at com.xpandit.jiraxporter.manager.impl.XporterFieldRetrieverImpl.lambda$getFieldRetriever$152(Unknown Source) at com.xpandit.jiraxporter.mapping.c.a(Unknown Source) at java.lang.Iterable.forEach(Iterable.java:75) at com.xpandit.jiraxporter.mapping.c.b(Unknown Source) at com.xpandit.jiraxporter.mapping.c.a(Unknown Source) at com.xpandit.jiraxporter.mapping.b.a(Unknown Source) at java.lang.Iterable.forEach(Iterable.java:75) at com.xpandit.jiraxporter.mapping.b.a(Unknown Source) at com.xpandit.jiraxporter.mapping.b.call(Unknown Source) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)Caused by: java.lang.IllegalStateException: Incorrect usage of JIRA/lucene search API. You can only create/use: ManagedIndexSearcher inside a context (request or Jira-Thread-Local). Check: JiraThreadLocalUtils for details. at com.atlassian.jira.index.ManagedIndexSearcherFactory.createFrom(ManagedIndexSearcherFactory.java:15) at com.atlassian.jira.issue.index.ThreadLocalSearcherCache$Cache.retrieveEntitySearcher(ThreadLocalSearcherCache.java:142) at com.atlassian.jira.issue.index.ThreadLocalSearcherCache.getSearcher(ThreadLocalSearcherCache.java:40) at com.atlassian.jira.issue.index.DefaultIndexManager.getEntitySearcher(DefaultIndexManager.java:965) at com.atlassian.jira.issue.index.DefaultIndexManager.getIssueSearcher(DefaultIndexManager.java:941) ... 1 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:38) at com.sun.proxy.$Proxy29.getIssueSearcher(Unknown Source) at com.atlassian.jira.issue.search.SearchProviderFactoryImpl.getSearcher(SearchProviderFactoryImpl.java:17) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.getIssueSearcher(LuceneSearchProvider.java:132) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.getHitCount(LuceneSearchProvider.java:147) at com.atlassian.jira.bc.issue.search.DefaultSearchService.searchCountOverrideSecurity(DefaultSearchService.java:141) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy251.searchCountOverrideSecurity(Unknown Source) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) 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:186) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) 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:186) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) at com.sun.proxy.$Proxy5461.searchCountOverrideSecurity(Unknown Source) at com.coresoftlabs.sla_powerbox.service.ServiceSlaGoalUtilsImpl.matchSlaItemByJQL(ServiceSlaGoalUtilsImpl.java:117) at com.coresoftlabs.sla_powerbox.service.ServiceSlaGoalUtilsImpl.access$000(ServiceSlaGoalUtilsImpl.java:48) at com.coresoftlabs.sla_powerbox.service.ServiceSlaGoalUtilsImpl$1.load(ServiceSlaGoalUtilsImpl.java:78) at com.coresoftlabs.sla_powerbox.service.ServiceSlaGoalUtilsImpl$1.load(ServiceSlaGoalUtilsImpl.java:75) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3528) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2277) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044) ... 26 more2022-01-06 11:35:04,977+0000 Xporter-fieldmapper-da0cfa1ebb3a483db973b3da12d2671c-1 DEBUG admin 695x22110x1 bix7v3 0:0:0:0:0:0:0:1 /rest/jiraxporter/1.0/export/ [c.x.jiraxporter.mapping.e] Loading field: SLA 22022-01-06 11:35:04,977+0000 Xporter-fieldmapper-da0cfa1ebb3a483db973b3da12d2671c-1 DEBUG admin 695x22110x1 bix7v3 0:0:0:0:0:0:0:1 /rest/jiraxporter/1.0/export/ [c.x.j.manager.impl.XporterFieldRetrieverImpl] Time to Load custom field: 02022-01-06 11:35:04,977+0000 Xporter-fieldmapper-da0cfa1ebb3a483db973b3da12d2671c-1 WARN admin 695x22110x1 bix7v3 0:0:0:0:0:0:0:1 /rest/jiraxporter/1.0/export/ [c.a.j.web.filters.ThreadLocalQueryProfiler] Incorrect JIRA API usage. ThreadLocalQueryProfiler#store called outside of the context. Please report this to support with the following stack trace.java.lang.Throwable at com.atlassian.jira.web.filters.ThreadLocalQueryProfiler.store(ThreadLocalQueryProfiler.java:63) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByPrimaryKey(DefaultOfBizDelegator.java:345) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByPrimaryKey(DefaultOfBizDelegator.java:335) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findById(DefaultOfBizDelegator.java:327) at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.findById(WrappingOfBizDelegator.java:192) at com.atlassian.jira.issue.managers.DefaultIssueManager.getIssue(DefaultIssueManager.java:143) at com.atlassian.jira.issue.managers.DefaultIssueManager.getIssueObject(DefaultIssueManager.java:323) at com.atlassian.jira.issue.managers.RequestCachingIssueManager.getIssueObject(RequestCachingIssueManager.java:58) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy592.getIssueObject(Unknown Source) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) 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:186) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) 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:186) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) at com.sun.proxy.$Proxy5473.getIssueObject(Unknown Source) at com.coresoftlabs.sla_powerbox.calculate.calculator.simple.SimpleBehaviourCalculator.calculateKpiAndGenerateHistory(SimpleBehaviourCalculator.java:79) at com.coresoftlabs.sla_powerbox.calculate.calculator.simple.SimpleBehaviourCalculator.calculateAndGenerateHistory(SimpleBehaviourCalculator.java:69) at com.coresoftlabs.sla_powerbox.calculate.calculator.simple.SimpleBehaviourCalculator.calculate(SimpleBehaviourCalculator.java:63) at com.coresoftlabs.sla_powerbox.calculate.manage.SlaCustomFieldCalculateManagerImpl.getCalculatedSlaModel(SlaCustomFieldCalculateManagerImpl.java:128) at com.coresoftlabs.sla_powerbox.calculate.manage.SlaCustomFieldCalculateManagerImpl.getCalculatedSlaModel(SlaCustomFieldCalculateManagerImpl.java:86) at com.coresoftlabs.sla_powerbox.calculate.service.SlaCustomFieldCalculateServiceImpl.getSlaModelForIssueValue(SlaCustomFieldCalculateServiceImpl.java:51) at com.coresoftlabs.sla_powerbox.field.slametric.SlaMetricCustomField.getValueFromIssue(SlaMetricCustomField.java:355) at com.coresoftlabs.sla_powerbox.field.slametric.SlaMetricCustomField.getValueFromIssue(SlaMetricCustomField.java:68) at com.atlassian.jira.issue.fields.ImmutableCustomField.getValue(ImmutableCustomField.java:354) at com.atlassian.jira.issue.DocumentIssueImpl.getCustomFieldValue(DocumentIssueImpl.java:350) at com.xpandit.jiraxporter.mapping.e.a(Unknown Source) at com.xpandit.jiraxporter.manager.impl.XporterFieldRetrieverImpl.lambda$getFieldRetriever$152(Unknown Source) at com.xpandit.jiraxporter.mapping.c.a(Unknown Source) at java.lang.Iterable.forEach(Iterable.java:75) at com.xpandit.jiraxporter.mapping.c.b(Unknown Source) at com.xpandit.jiraxporter.mapping.c.a(Unknown Source) at com.xpandit.jiraxporter.mapping.b.a(Unknown Source) at java.lang.Iterable.forEach(Iterable.java:75) at com.xpandit.jiraxporter.mapping.b.a(Unknown Source) at com.xpandit.jiraxporter.mapping.b.call(Unknown Source) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

       

      • Note:
      • The rest API to return the JQL search does contain the information from the fields;
      • When export in bulk to a CSV, using Jira native function, the fields are correctly exported;
      • When exporting to xlsx (current fields) it is not exported.

      Actual result/Attachments
      The problem is all reproduced in the gif attached:  Steps to reproduce.gif

       

      Expected result
      All information should be exported as expected.

      Version

      • 6.9.3

       

      Attachments

        1. Client_Template_updated.xlsx
          11 kB
          Ana Teixeira
        2. image-2022-01-06-12-16-03-273.png
          78 kB
          Ana Teixeira
        3. image-2022-01-06-12-16-47-958.png
          19 kB
          Ana Teixeira
        4. image-2022-01-06-12-18-28-177.png
          33 kB
          Ana Teixeira
        5. image-2022-01-06-12-18-49-576.png
          33 kB
          Ana Teixeira
        6. image-2022-01-06-12-19-46-164.png
          49 kB
          Ana Teixeira
        7. image-2022-01-06-12-20-59-705.png
          47 kB
          Ana Teixeira
        8. image-2022-01-06-12-21-15-292.png
          47 kB
          Ana Teixeira
        9. image-2022-01-06-12-22-03-313.png
          55 kB
          Ana Teixeira
        10. image-2022-01-06-12-22-20-507.png
          55 kB
          Ana Teixeira
        11. SLA Powerbox Configuration example.gif
          11.25 MB
          Ana Teixeira
        12. Steps to reproduce.gif
          19.57 MB
          Ana Teixeira

        Activity

          People

            bernardo.cottim Bernardo Cottim
            amgt Ana Teixeira
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: