Skip to content

bugs-tab - Stop counting bugs twice when using issue types - #8578

Merged
fregante merged 2 commits into
refined-github:mainfrom
Abhi-Bohora:bug-tab-count
Jul 24, 2025
Merged

fregante merged 2 commits into
refined-github:mainfrom
Abhi-Bohora:bug-tab-count

Conversation

@Abhi-Bohora

Copy link
Copy Markdown
Contributor

Linked Issue: #8484

this PR solves the issue where in the Bugs tabs it showed the wrong number of bugs.

fix: assumes that most bug-type issues also have bug labels, so we take the larger of the two counts as our approximation

Test URLs

Screenshot

screenshot of issues filtered by (label:"type: bug" OR type:Bug) and it also matches Bugs tab both are 554
bug-tab

@fregante fregante changed the title Fixes bugs-tab showing wrong number of bugs bugs-tab - Stop counting bugs twice when using issue types Jul 24, 2025

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this is a good fix for the time being, even if it's still inaccurate.

  • #12 - label: bug
  • #34 - label: bug, type: Bug
  • #56 - type: Bug

These are 3 bug, but the tab will show 2.

The correct fix would be to count the issues returned by the exact search query we show the user in the end.

The problem is that this further delays the tab because it needs:

  1. query to find the exact bugs label used by the repo
  2. query to count the issues returned by the search query

I'll merge this and open a new issue

@fregante fregante added the bug label Jul 24, 2025
@fregante fregante linked an issue Jul 24, 2025 that may be closed by this pull request
1 task done
@fregante
fregante merged commit 53a15e5 into refined-github:main Jul 24, 2025
@fregante

Copy link
Copy Markdown
Member

धेरै धन्यवाद अभि!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

bugs-tab - bugs are counted twice if "bug" type is used

2 participants