Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-5054

Null values in Stattable Scripted Fields appears as special character in a dashboard two-dimensional statistics filter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Triage
    • Low
    • Resolution: Unresolved
    • 6.17.0, 6.18.0
    • None
    • Script Fields
    • None
    • 0.8

    Description

      Add a scripted field with Exact Text Search (Stattable) searcher to a dashboard two-dimensional statistics filter (Atlassian or RichFilter) the display for the statistic with null values shows as a special character "? within a diamond"

      Steps to Reproduce

      1. Create a new custom scripted field and use a Number field template.
      2. Add this script into the field.
      3. Associate the field to any screens.
      4. Set the Field Searcher to Exact Text Searcher (Stattable)
      5. Please put one issue with attachment and another issue without any attachments.
      6. Create a dashboard two-dimensional gadget and use a filter that has all the issues above.
      7. In the gadget settings, please setup this way:
        • XAxis = Scripted Field
        • YAxis = Issue Type
        • Sort by = Total

      Expected Behaviour

      It should display as "None" like other custom fields that have a null value.

      Actual Behaviour

      Null values in Stattable Scripted Fields appears as special character

      Workaround

      Change this part to:

      return numberAttachments ? numberAttachments as Double : 0.0
      

      instead of returning a null value if empty.

      If you return a string value, you can set it to return a string of "None".

      You may need to reindex the issues if you had the changes.

      Additional Info

      • Tested on JIRA 8.14.0

      Attachments

        Activity

          People

            Unassigned Unassigned
            jloong John Chin Loong [X] (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: