JSON Export Breaks when Issue has Cascading Select Values

XMLWordPrintable

    • 7.02
    • 16
    • Severity 3 - Minor
    • 2

      Problem

      When an issue has an cascading select field with any value, it will break the JSON export.

      • If there is no field value, the JSON export will work fine.

      Steps to Reproduce

      1. Enable JSON export as detailed here: https://confluence.atlassian.com/display/JIRAKB/How+To+Enable+JSON+Export+in+JIRA
        • Note that this functionality is still in beta
      2. Create a cascading select field
      3. Configure the options to add a value (like "abc")
      4. Create a ticket and populate the cascade field with the "abc" value
      5. Attempt to do a JSON export on the issue
      6. Note that it fails with a 500 error
      7. Perform a JQL search, ensure to include the ticket with a cascading select field
      8. Attempt to export the search to JSON
      9. Note that the export stops with truncated result set.

      Expected Results

      The JSON exports would complete

      Actual Results

      • JQL JSON export data is truncated and stops upon running into the 500 error
      • Issue JSON export fails with 500 error
      • Error in logs:
        2017-03-07 22:26:16,052 http-nio-8080-exec-3 ERROR      [o.a.c.c.C.[.[localhost].[/].[searchrequest-view]] Servlet.service() for servlet [searchrequest-view] in context with path [] threw exception
        java.lang.RuntimeException: org.codehaus.jackson.JsonGenerationException: Null key for a Map not allowed in JSON (use a converting NullKeySerializer?)
                at com.atlassian.jira.plugins.importer.views.SearchRequestJsonView.writeSearchResults(SearchRequestJsonView.java:67)
                at com.atlassian.jira.plugin.searchrequestview.DefaultSearchRequestURLHandler.handleRequest(DefaultSearchRequestURLHandler.java:372)
                at com.atlassian.jira.web.servlet.SearchRequestViewServlet.doGet(SearchRequestViewServlet.java:25)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
                ...
        Caused by: org.codehaus.jackson.JsonGenerationException: Null key for a Map not allowed in JSON (use a converting NullKeySerializer?)
                at org.codehaus.jackson.map.ser.impl.FailingSerializer.serialize(FailingSerializer.java:34)
                at org.codehaus.jackson.map.ser.std.MapSerializer.serializeFields(MapSerializer.java:237)
                at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:186)
                at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:23)
                at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:446)
                at org.codehaus.jackson.map.ser.std.BeanSerializerBase.serializeFieldsFiltered(BeanSerializerBase.java:203)
                at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:110)
        		...
        

      Workaround

      • Remove the cascading select field values from the tickets.

            Assignee:
            Unassigned
            Reporter:
            David Chan
            Votes:
            20 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated: