Add weakness type to triage/important columns per team - #57
Conversation
Closes keycloak#56 Signed-off-by: Martin Bartoš <mabartos@redhat.com>
| } | ||
|
|
||
| private BugStat column(String label) { | ||
| String key = configNamespace + ".team." + label.replaceAll(" ", ""); |
There was a problem hiding this comment.
prefer a more robust approach (e.g. replaceAll("\s+", "") or a small helper that strips whitespace and normalizes other punctuation) so labels with multiple spaces or unexpected characters map consistently to config keys.
msdaly200
left a comment
There was a problem hiding this comment.
small nit about stripping whitespace but looks great! Very useful!
There was a problem hiding this comment.
Pull request overview
Adds a per-team “Weaknesses” view to the dashboard so that kind/weakness issues are surfaced in the same team column breakdowns (triage/blocker/important/etc.) as other issue types.
Changes:
- Introduce weakness-specific team stats (filtering
kind/weakness) and expose them to the FreeMarker templates. - Add a new “Weaknesses per team” module and include it on the Bugs page.
- Add configurable warn/error thresholds for weakness team columns and refactor
BugTeamStatto support per-namespace thresholds.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/module-weakness-teams.ftl | New FreeMarker module rendering “Weaknesses per team” table. |
| src/main/resources/config.properties | Adds warn/error thresholds for weaknesses.team.* columns. |
| src/main/resources/bugs.ftl | Includes the new weakness team module on the Bugs page. |
| src/main/java/org/keycloak/dashboard/rep/Teams.java | Introduces a NO_TEAM constant to avoid magic strings. |
| src/main/java/org/keycloak/dashboard/Dashboard.java | Publishes weaknessTeamStats into template attributes. |
| src/main/java/org/keycloak/dashboard/beans/WeaknessTeamStat.java | Defines a weakness-flavored BugTeamStat using the weaknesses config namespace. |
| src/main/java/org/keycloak/dashboard/beans/filters/OpenWeaknessFilter.java | Adds an is:open label:kind/weakness filter implementation. |
| src/main/java/org/keycloak/dashboard/beans/filters/FilteredIssues.java | Adds openWeakness() convenience filter. |
| src/main/java/org/keycloak/dashboard/beans/BugTeamStat.java | Refactors team columns to read warn/error thresholds via a configurable namespace. |
| src/main/java/org/keycloak/dashboard/beans/BugStat.java | Minor formatting change (blank line). |
| src/main/java/org/keycloak/dashboard/beans/Bugs.java | Builds and exposes weakness team stats (getTeamWeaknessStats()). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| private BugStat column(String label) { | ||
| String key = configNamespace + ".team." + label.replaceAll(" ", ""); | ||
| return BugStat.team(label) | ||
| .warnCount(Config.getInt(key + ".warn")) | ||
| .errorCount(Config.getInt(key + ".error")); | ||
| } |
| columns.add(column("Triage Overdue") | ||
| .issues(issues.clone().triage(true).createdBefore(DateUtil.minusdays(Config.getInt("bugs.TriageOverdue.days"))))); | ||
|
|
||
| columns.add(BugStat.team("Blocker") | ||
| columns.add(column("Blocker") | ||
| .issues(issues.clone().triage(false).priority("blocker"))); | ||
|
|
||
| columns.add(BugStat.team("Blocker Overdue") | ||
| columns.add(column("Blocker Overdue") | ||
| .issues(issues.clone().triage(false).priority("blocker").createdBefore(DateUtil.minusdays(Config.getInt("bugs.BlockerOverdue.days"))))); | ||
|
|
||
| columns.add(BugStat.team("Important") | ||
| columns.add(column("Important") | ||
| .issues(issues.clone().triage(false).priority("important"))); | ||
|
|
||
| columns.add(BugStat.team("Important Overdue") | ||
| columns.add(column("Important Overdue") | ||
| .issues(issues.clone().triage(false).priority("important").createdBefore(DateUtil.minusdays(Config.getInt("bugs.ImportantOverdue.days"))))); |
@abstractj @rmartinc I've prepared the PR if you don't mind :) I think it's very valuable for the team to be aware of weakness issues.
Screencast.From.2026-07-09.15-33-25.mp4