Uploaded image for project: 'Xray for Jira Cloud'
  1. Xray for Jira Cloud
  2. XRAYCLOUD-7208

An error is thrown when exporting a wiki custom field containing a key in plain text for an Xray issue type

    XporterXMLWordPrintable

Details

    • XRAYCLOUD 2024 Sprint 9
    • UNCOVERED

    Description

      An error is thrown when exporting a wiki field containing a key in plain text for an Xray issue type.

      Steps to reproduce

      1 - Add one custom field of the type text field (multi-line), with the renderer wiki style

      2 - In that field, write a Key of an Xray issue type in plain text:

      3 - Use the following code in a template:

      ${Key}
      ${wiki:paragraph wiki}
      

      4 - The template will be exported with the following error:

      We are sorry, an unexpected error has occured in the export of your issue.
      Please provide the information below to our support.
      
      General Exception: java.lang.RuntimeException: java.lang.IllegalStateException: Invalid document model. Operation can not be completed.
      java.lang.RuntimeException: java.lang.IllegalStateException: Invalid document model. Operation can not be completed.
      	at com.aspose.words.FieldCollection$zzZ.zzZoA(Unknown Source)
      	at com.aspose.words.FieldCollection$zzZ.next(Unknown Source)
      	at java.lang.Iterable.forEach(Iterable.java:74)
      	at com.xpandit.jiraxporter.commons.document.builder.impl.aspose.word.AsposeWordConverter.processFieldLinks(AsposeWordConverter.java:473)
      	at com.xpandit.jiraxporter.commons.document.builder.impl.aspose.word.AsposeWordConverter.convert(AsposeWordConverter.java:372)
      	at com.xpandit.plugins.jiraxporter.web.services.impl.ExportServiceImpl.processBulkRequest(ExportServiceImpl.java:232)
      	at com.xpandit.plugins.jiraxporter.web.services.impl.ExportServiceImpl.handleBulk(ExportServiceImpl.java:208)
      	at com.xpandit.plugins.jiraxporter.web.services.impl.ExportServiceImpl.access$000(ExportServiceImpl.java:70)
      	at com.xpandit.plugins.jiraxporter.web.services.impl.ExportServiceImpl$1.run(ExportServiceImpl.java:123)
      Caused by: java.lang.IllegalStateException: Invalid document model. Operation can not be completed.
      	at com.aspose.words.zzZX5.zzZpF(Unknown Source)
      	at com.aspose.words.zzZX5.zzZ(Unknown Source)
      	at com.aspose.words.zzZX5.zzV(Unknown Source)
      	at com.aspose.words.zzZX5.zzW(Unknown Source)
      	at com.aspose.words.FieldChar.getField(Unknown Source)
      	at com.aspose.words.FieldCollection$zzZ.zzZoA(Unknown Source)
      	... 8 more
      

      Workaround

      If the key is for another issue type, or we don't use the wiki function, or the key is converted into a smart link, the error is not thrown.

      Attachments

        Activity

          People

            nikhil.diwan Nikhil Diwan
            pmax Paulo Aleixo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: