Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-67179

Importing a backup from Jira Cloud to Jira server fails with 'value too long for type character varying' error

    XMLWordPrintable

Details

    Description

      Summary

      context

      Due to some recent changes in the way Jira Cloud Service Desk customers are handled, usernames are now defined as hashes (i.e. qm:40119c12-142a-4f0e-a336-a2c82019b1b8:5acdffd3bb811e2b3af8d635) 

      Whenever importing a backup from Jira Cloud into Jira Server, import process will fail with error value too long for type character varying(60)

      Expected results:

      Restore from Jira Cloud to Jira Service finishes with no exceptions.

      Actual results:

      Error below is observed, whenever a customer has performed a transition in any Service Desk issue, causing a record to be created in the os_historystep table containing his username in the caller column -

      Unexpected error occurred during import: org.ofbiz.core.entity.GenericEntityException: while inserting:
      [GenericEntity:OSHistoryStep][owner,][caller,qm:40119c12-142a-4f0e-a336-a2c82019b1b8:5acdffd3bb811e2b3af8d635][stepId,1][actionId,41][finishDate,2018-04-19 13:09:00.271][id,12925][startDate,2018-04-19 13:08:44.666][entryId,12816][status,null] (SQL Exception while executing the following:INSERT INTO public.OS_HISTORYSTEP (ID, ENTRY_ID, STEP_ID, ACTION_ID, OWNER, START_DATE, DUE_DATE, FINISH_DATE, STATUS, CALLER) VALUES (?,?,?,?,?,?,?,?,?,?) 
      (ERROR: value too long for type character varying(60)))
      

      Workaround:

      • Change the column's maximum length in the server database table by running the following command:
        ALTER TABLE os_historystep ALTER COLUMN caller TYPE character varying(255);
        

        For Microsoft SQL Server:

        ALTER TABLE os_historystep ALTER COLUMN caller NVARCHAR(255);
        

        For Oracle database:

         
        ALTER TABLE os_historystep MODIFY caller VARCHAR2(255 CHAR);
        

      Attachments

        Issue Links

          Activity

            People

              kkanojia Kunal Kanojia
              lhubert@atlassian.com Leonardo H
              Votes:
              9 Vote for this issue
              Watchers:
              32 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: