[AISOS-2281] Grafana issue detail classifies Task tickets as Bug#204
Merged
Conversation
Changed the Grafana Forge Issue Detail dashboard Type panel (panel-2) to display the actual ticket_type value from Langfuse trace metadata instead of incorrectly converting it to a binary Bug/Feature mapping. Changes: - SQL query: Use nullIf(metadata['ticket_type'], '') for direct value extraction instead of if(..., 1, 0) binary conversion - fieldConfig: Remove value mappings (0=Bug, 1=Feature) so the panel displays the raw string value (Task, Bug, Feature, Epic, etc.) The nullIf pattern matches existing dashboard conventions. The minimal fieldConfig pattern matches panel-3 (Total Traces) in the same file. Closes: AISOS-2282
ekuris-redhat
approved these changes
Jul 24, 2026
ekuris-redhat
left a comment
Collaborator
There was a problem hiding this comment.
The fix looks correct
Old query used if(metadata['ticket_type'] = 'Feature', 1, 0) a binary that collapsed every non-Feature type to 0, then value mappings displayed 0 as "Bug"
While new query uses nullIf(metadata['ticket_type'], '') returns the actual type string, so the mappings are correctly removed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #161
Summary
This PR fixes the Grafana Forge Issue Detail dashboard's Type panel to correctly display all ticket types (Task, Epic, Bug, Feature, etc.) instead of incorrectly classifying non-Feature tickets as "Bug". The root cause was a binary conversion in the SQL query that mapped Feature→1 and everything else→0, combined with value mappings that displayed 0 as "Bug". This fix ensures operators see accurate ticket type information when reviewing traces.
Changes
Dashboard Query Fix
devtools/grafana/dashboards/forge-issue-detail.jsonpanel-2 (Type panel)if(metadata['ticket_type'] = 'Feature', 1, 0)) to direct value extraction usingnullIf(metadata['ticket_type'], '')Documentation Review
ticket_typeas a metadata field, not the internal panel implementationImplementation Notes
nullIf(field, '')pattern matches existing conventions used elsewhere in the same dashboard (e.g., line 77 for workflow_step)fieldConfigwith emptydefaultsandoverridesmatches the pattern used by panel-3 (Total Traces) in the same fileTesting
python3 -c "import json; json.load(open(...))")test_grafana_dashboard_json_is_valid()andtest_dashboards_use_configurable_trace_fields()Related Tickets
Generated by Forge SDLC Orchestrator