Skip to content

Count and rank projects by OPEN issues only in Projects view - #692

Merged
conorheffron merged 1 commit into
mainfrom
copilot/update-open-issues-count-logic
May 24, 2026
Merged

Count and rank projects by OPEN issues only in Projects view#692
conorheffron merged 1 commit into
mainfrom
copilot/update-open-issues-count-logic

Conversation

Copilot AI commented May 24, 2026

Copy link
Copy Markdown
Contributor

Projects view was counting all issues when populating issueCount, which caused closed issues to affect both the displayed count and repository ordering. This update makes the count and sort logic use OPEN issues only.

  • Backend count semantics

    • Updated GitProjectsController to compute issueCount from issues where state == "open" (case-insensitive).
    • Kept existing sorting behavior (issueCount desc), now based on open-only counts.
  • Behavioral coverage

    • Added integration coverage in GitProjectsControllerIntegrationTest to validate:
      • closed issues are excluded from issueCount
      • repositories are ordered by open-issue count
  • Representative change

    private int countOpenIssues(List<RepositoryIssueDto> issues) {
        if (issues == null) {
            return 0;
        }
        return (int) issues.stream()
                .filter(Objects::nonNull)
                .map(RepositoryIssueDto::getState)
                .filter(Objects::nonNull)
                .filter("open"::equalsIgnoreCase)
                .count();
    }

Agent-Logs-Url: https://github.com/conorheffron/ironoc/sessions/14e51559-eece-4bdb-80e4-1dbab4a8143c

Co-authored-by: conorheffron <8218626+conorheffron@users.noreply.github.com>
@conorheffron conorheffron added ui-frontend java-be Java / Server Side Tasks java Pull requests that update Java code javascript Pull requests that update Javascript code labels May 24, 2026
@conorheffron
conorheffron merged commit 2937fa7 into main May 24, 2026
11 of 13 checks passed
@conorheffron
conorheffron deleted the copilot/update-open-issues-count-logic branch May 24, 2026 08:45
Copilot AI removed the request for review from Copilot May 24, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update Java code java-be Java / Server Side Tasks javascript Pull requests that update Javascript code ui-frontend

Projects

Development

Successfully merging this pull request may close these issues.

2 participants