Uploaded image for project: 'JIRA Components'
  1. JIRA Components
  2. JIRA-138

Give working defaults to the parameters of the JIRA chart macros and check their values

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 11.1.8
    • Charts Macros
    • None
    • Unknown

    Description

      The parameters of the JIRA chart macros have no default that works, so the Edit Macro dialog opens on empty or invalid values, and their numbers declare no range, so an invalid one is sent to JIRA, whose answer blames the query or the rights of the user.

      They are defined in JIRAPieChartMacroParameters.java, JIRACreatedVsResolvedMacroParameters.java and JIRABiDimensionalGridChartMacroParameter.java.

      • Defaults: declare working defaults, such as 30 days and Daily for the created versus resolved chart and STATUS for the pie chart, and make these parameters optional. A default of 0 for daysPreviously is rejected by JIRA.
      • Ranges: declare a minimum of 1 for numberOfResults, daysPreviously and maxData, for example with @Min(1), so that an invalid value fails with a message naming the parameter instead of reaching JIRA.
      • Messages: the conversion errors of the enums, such as "Unable to convert value [unknownValue]. Allowed values are...", list the values but do not name the parameter, see XRENDERING-823, and maybe is read as false for the booleans, see XCOMMONS-3847.

      Depends on

      KOs covered

      Macro Criterion Parameter Problem
      jiraCreatedVsResolvedChart C2 mandatory daysPreviously Required, while a default such as 30 works for the most common example.
      jiraCreatedVsResolvedChart C3 defaults daysPreviously Opens on 0, the declared default, which JIRA rejects.
      jiraCreatedVsResolvedChart C2 mandatory period Required, while a default such as Daily works for the most common example.
      jiraCreatedVsResolvedChart C3 defaults period Minor: the select opens on an empty option.
      jiraPieChart C2 mandatory type Required, while STATUS, the first option, works for the most common examples.
      jiraPieChart C3 defaults type The select opens empty, Status is not preselected.
      jiraBiDimensionalGridChart C3 defaults xAxisField, yAxisField Minor: the selects open on an empty option.
      jiraBiDimensionalGridChart C13 constraints numberOfResults A positive number with no declared range: abc, 0 and -3 are sent to JIRA.
      jiraCreatedVsResolvedChart C13 constraints daysPreviously A positive number with no declared range: abc, -3 and 0 are sent to JIRA.
      jiraPieChart C13 constraints maxData A positive number with no declared range: abc, 0 and -3 are accepted silently.
      jiraBiDimensionalGridChart E2 errors Invalid numbers give the JIRA error about the query or the rights, maybe booleans are read as false, and an unknown axis field gives a message that does not name the parameter.
      jiraCreatedVsResolvedChart E2 errors Invalid numbers give the JIRA error about the query or the rights, maybe booleans are read as false, and an unknown period gives a message that does not name the parameter.
      jiraPieChart E2 errors maxData with abc or 0 gives one single "Other data" slice with no message, and an unknown type gives a message that does not name the parameter.

      Impact found on macro fluidity

      These 14 KOs come from the WYSIWYG usability audit of the macros, applied to JIRA Macros 11.1.8 on XWiki 18.8.0, under the criteria C2 mandatory, C3 defaults, C13 constraints and E2 errors of its usability criteria. The axis fields row stands for one KO per field.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Lucas C Charpentier Lucas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: