It looks like the red and green issues progress bar is computed wrong.
it does:
issues_cnt / (issues_cnt + oth_issues)
but oth_issues is a superset of issues_cnt, so the ratio should be
issues_cnt / oth_issues
Also, i think the calculation is wrong for the closed status tab too, but i'm not sure what the progress bar is supposed to show in that case? maybe it should just be 1.0 - the value used in the open case?
irc conversation: [12:48:25] So, silly pagure question: [12:48:40] What does the green and red thing on issue list pages mean? [12:50:08] Like this one: https://pagure.io/atomic-wg/issues [12:51:01] gholms: I think is the percentage of closed bugs ( green) vs open (red) [12:51:27] fale: nope, because if you click Closed you get a different green and red bar [12:51:45] ^ [12:51:56] halfline: true, also "all" has no bar at all :/ [12:52:06] probably pingou can solve the mistery [12:53:49] maybe it's issues that have been assigned ? [12:54:12] Well, if we look at this one: https://pagure.io/atomic-wg/issues?status=Open&tags=meeting [12:54:22] hmm nope, if you look at closed issues, they're all assigned but it's on 50% [12:54:24] Five of eight are assigned, but the thing says 50%. [12:54:53] is this page still current? https://fedoraproject.org/wiki/Architectures [12:55:24] The notion of primary and secondary arches is in flux right now, so probably not entirely. [12:57:02] * gholms goes to read the pagure docs, finds only an installation guide :( [12:57:35] gholms: in the html it's given two style classes roughly named "add remove bar" and "issues progress bar" [12:59:20] * gholms files a bug asking for tooltips [13:01:25] well i was going to look in git history to get some context [13:01:32] but most of the git history for pagure is missing [13:01:43] Heh. Whoops. [13:01:46] because it used to be called progit and when it was renamed the history was truncated [13:03:54] [13:03:54] {{ (100.0 * (1 - issues_cnt / (issues_cnt + oth_issues)))|round|int }}% [13:04:38] so it's a ratio of issues to (issues + other issues) [13:07:01] issues_cnt = pagure.lib.search_issues(• [13:07:01] closed=True if status.lower() != 'open' else False,• [13:07:01] status=status.capitalize() if status.lower() != 'closed' else None,• [13:07:01] )• [13:07:01] oth_issues = pagure.lib.search_issues(• [13:07:01] closed=True if status.lower() != 'open' else False,• [13:07:01] )• [13:07:37] * gholms can't tell what that means with all the line wrapping [13:08:05] the difference between "issues" and "other issues" is issues has an additional keyword "status" [13:09:29] presumably status is normally "Open" when on the open tab [13:10:03] so it really looks like it's supposed to be opened versus closed issues [13:10:07] but [13:10:13] the math is wrong unless i'm missing something [13:10:53] "other issues" already includes open issues [13:11:02] but the template it adds it in too [13:11:33] which explains why the Closed tab shows 50% [13:11:49] it's always going to be 50% unless i'm misunderstanding soemthing [13:14:29] to rephrase, i think the code is asking "How many open issues do i have?" and also "How many total issues do i have" then it's computing the progress bar lenght like "open_issues / (open_issues + total_issues)" instead of "open_issues / total_issues"
Fixed by @aavrug in https://pagure.io/pagure/pull-request/1693
@pingou changed the status to Closed
Closed