Skip to content

Add weakness type to triage/important columns per team - #57

Merged
stianst merged 1 commit into
keycloak:mainfrom
mabartos:KC-56
Jul 10, 2026
Merged

Add weakness type to triage/important columns per team#57
stianst merged 1 commit into
keycloak:mainfrom
mabartos:KC-56

Conversation

@mabartos

@mabartos mabartos commented Jul 9, 2026

Copy link
Copy Markdown
Member

@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

Comment thread src/main/resources/config.properties Outdated
Closes keycloak#56

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
}

private BugStat column(String label) {
String key = configNamespace + ".team." + label.replaceAll(" ", "");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 msdaly200 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nit about stripping whitespace but looks great! Very useful!

@stianst
stianst merged commit 95df719 into keycloak:main Jul 10, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 BugTeamStat to 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.

Comment on lines +59 to +64
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"));
}
Comment on lines +34 to 47
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")))));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add weakness type to triage/important columns per team

4 participants