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

No test coverage for passing a JQL query to the jiraBiDimensionalGridChart Macro

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Major
    • None
    • 10.2
    • Charts Macros
    • None
    • Unknown

    Description

      Problem

      JIRA-74 added the ability to pass a JQL query instead of a filter id to the jiraBiDimensionalGridChart Macro. It is implemented by JIRABiDimensionalGridChartDataFetcher.handleQueryParameter(), which overrides the base implementation in AbstractJIRAChartDataFetcher and sends filterId=jql-<query> rather than the parameter the other two chart Macros send.

      That override has no test. JIRABiDimensionalGridChartDataFetcherTest only exercises the filterId path, and no test in jira-macro-charts references the query parameter at all - a grep for setQuery / getQuery / jql- across jira-macro-charts/src/test returns nothing.

      So the one place where this Macro deliberately diverges from the other two is the one place the build does not check, and the documented behaviour comes from reading the code rather than from a passing test.

      What to do

      Add a unit test on JIRABiDimensionalGridChartDataFetcher asserting that a query parameter produces filterId=jql-<query>, mirroring the existing filterId test.

      Attachments

        Activity

          People

            Unassigned Unassigned
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: