Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-7830

Restore With Long JQL Queries for Card Colours Fails

    XMLWordPrintable

Details

    Description

      Steps to Reproduce:

      1. Create a "Rapid" Board
      2. Configure -> Card Colors -> Queries
      3. Add a long JQL Query (more than 255 characters in length). For example:
        (Status = Open AND "Start Date" >= startOfDay() AND "Start Date" <= startOfDay("+1d")) OR
        (Status = "Work Started" AND "Start Date" >= startOfDay("-3d") AND "Start Date" < startOfDay("-1d")) OR
        (Status = "Halfway through" AND "Start Date" >= startOfDay("-9d") AND "Start Date" < startOfDay("-7d")) OR
        (Status = "Nearly Completed" AND "Start Date" >= startOfDay("-13d") AND "Start Date" < startOfDay("-11d"))
        
      4. Perform an XML Backup.
      5. Perform an XML Restore.

      Expected Results

      The Card colour configuration is successfully imported.

      Actual Results

      The restore process throws an SQL exception as shown below and the card colour configuration is not restored.

      2013-02-28 17:58:08,976 JiraImportTaskExecutionThread-1 ERROR admin 1078x226x1 6zz1tf 0:0:0:0:0:0:0:1 /secure/admin/XmlRestore.jspa [jira.bc
      .dataimport.DefaultDataImportService] Error during ActiveObjects restore
      com.atlassian.activeobjects.spi.ActiveObjectsImportExportException: There was an error during import/export with plugin Atlassian GreenHoppe
      r(com.pyxis.greenhopper.jira) #6.1.1 (table AO_60DB71_CARDCOLOR):Could not import data in table 'AO_60DB71_CARDCOLOR' column #6, value is to
      o big for column which size limit is 255, value is:
      (Status = Open AND "Start Date" >= startOfDay() AND "Start Date" <= startOfDay("+1d")) OR
      (Status = "Work Started" AND "Start Date" >= startOfDay("-3d") AND "Start Date" < startOfDay("-1d")) OR
      (Status = "Halfway through" AND "Start Date" >= startOfDay("-9d") AND "Start Date" < startOfDay("-7d")) OR
      (Status = "Nearly Completed" AND "Start Date" >= startOfDay("-13d") AND "Start Date" < startOfDay("-11d"))
      
              at com.atlassian.activeobjects.backup.ImportExportErrorServiceImpl.newImportExportException(ImportExportErrorServiceImpl.java:24)
              at com.atlassian.dbexporter.importer.DataImporter$BaseInserter.setString(DataImporter.java:363)
              at com.atlassian.dbexporter.importer.DataImporter$BaseInserter.setValue(DataImporter.java:409)
              at com.atlassian.dbexporter.importer.DataImporter.importTable(DataImporter.java:123)
              at com.atlassian.dbexporter.importer.DataImporter.access$000(DataImporter.java:33)
              at com.atlassian.dbexporter.importer.DataImporter$1.call(DataImporter.java:73)
              at com.atlassian.dbexporter.importer.DataImporter$1.call(DataImporter.java:62)
              at com.atlassian.dbexporter.jdbc.JdbcUtils.withConnection(JdbcUtils.java:31)
              at com.atlassian.dbexporter.importer.DataImporter.doImportNode(DataImporter.java:61)
              at com.atlassian.dbexporter.importer.AbstractImporter.importNode(AbstractImporter.java:49)
              at com.atlassian.dbexporter.DbImporter.importData(DbImporter.java:73)
              at com.atlassian.activeobjects.backup.ActiveObjectsBackup.restore(ActiveObjectsBackup.java:158)
              at com.atlassian.jira.bc.dataimport.DefaultDataImportService.restoreActiveObjects(DefaultDataImportService.java:439)
              at com.atlassian.jira.bc.dataimport.DefaultDataImportService.performImport(DefaultDataImportService.java:627)
              at com.atlassian.jira.bc.dataimport.DefaultDataImportService.doImport(DefaultDataImportService.java:251)
              at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:65)
              at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:28)
              at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:147)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
              at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForTenant(DefaultMultiTenantManager.java:61)
              at com.atlassian.multitenant.juc.MultiTenantExecutors$WrappedRunnable.run(MultiTenantExecutors.java:160)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:662)
      
      Workaround
      1. Ensure that the JQL queries are less than 255 characters before the export
      2. OR before importing the backup, edit the activeobjects.xml in the backup zip file and carefully ensure that the JQL queries are modified to the less that 255 characters.

      Attachments

        Activity

          People

            Unassigned Unassigned
            d18f466ecdfb Michael Stelzner [Communardo]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: