This issue has been created
There is 1 update.
 
 
JIRA Components / cid:jira-generated-image-avatar-6cdc9255-032f-446d-91dc-bc1e93e94026 JIRA-123 Open

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

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-5732af54-9b6c-4ae9-be70-49a4530b3f1c Vincent Massol created this issue on 27/Jul/26 22:27
 
Summary: No test coverage for passing a JQL query to the jiraBiDimensionalGridChart Macro
Issue Type: cid:jira-generated-image-avatar-6cdc9255-032f-446d-91dc-bc1e93e94026 Task
Affects Versions: 10.2
Assignee: Unassigned
Components: Charts Macros
Created: 27/Jul/26 22:27
Priority: cid:jira-generated-image-static-major-7cf91725-8dea-480b-85b0-8ff19b930191 Major
Reporter: Vincent Massol
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.

 
 

1 update

 
cid:jira-generated-image-avatar-5732af54-9b6c-4ae9-be70-49a4530b3f1c Changes by Vincent Massol on 27/Jul/26 22:28
 
Description: h2. 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.

h2. What to do
Add a unit test on {{JIRABiDimensionalGridChartDataFetcher}} asserting that a {{query}} parameter produces {{filterId=jql\-<query>}}, mirroring the existing {{filterId}} test.