Add an option to scrape all Bugzilla flags.#28
Add an option to scrape all Bugzilla flags.#28chutten wants to merge 1 commit intomikeconley:masterfrom
Conversation
Fixes mikeconley#26 There wasn't any UI code inside the onChange listener so I didn't make the needinfo setting visually subordinate to the all flags setting. Instead it is semantically subordinate.
|
Sorry for the delay - I hope to have this reviewed later this week. |
|
|
||
| if (settings.allBugzillaFlags) { | ||
| let flagCounts = {}; | ||
| bugzillaData.result.result.requestee.map(f => { |
There was a problem hiding this comment.
Not sure we need to use a map() here, since we're not actually using the return value. This could probably be a forEach, or (preferable):
let flagCounts = {};
for (let flag of bugzillaData.result.result.requestee) {
if (!(f.type in flagCounts)) {
flagCounts[f.type] = 0;
}
flagCounts[f.type]++;
}
return flagCounts;
mikeconley
left a comment
There was a problem hiding this comment.
Thanks, @chutten!
If you have the time, I have some minor suggestions here.
Mainly, I'm hoping we can have individual toggles for review, feedback, data-review and needinfo flags, so that users can pick and choose.
Do you think you'd have time to do that?
| } | ||
| let reviewTotal = | ||
|
|
||
| if (settings.allBugzillaFlags) { |
There was a problem hiding this comment.
Since we have the data, I guess we might as well do this count-up, regardless of whether or not this setting is set.
| <div class="form-rows"> | ||
| <input type="checkbox" id="bugzilla-allBugzillaFlags" data-setting="allBugzillaFlags"> | ||
| <label for="bugzilla-allBugzillaFlags">Count all Bugzilla Flags (implies "Count open needinfos too")</label> | ||
| </div> |
There was a problem hiding this comment.
Presumably, the flags we care about are:
reviewfeedbackdata-reviewneedinfo
Can we have those as individual entries instead?
|
@mikeconley @chutten Any chance of moving this forward? I had the same problem of missing a feedback? because I basically rely on MyQOnly. If neither of you is able to continue working on this, I can give it a shot, but I wanted to nag just in case you totally forgot about this pull. |
|
@gcp Yeah, sorry, I haven't made any forward progress on this since March. Please feel free to take it over. |
Please do! |
|
ooh, this feature would be great! I can take this over the finish line |
|
...actually, I might just start a new patch |
Fixes #26
There wasn't any UI code inside the onChange listener so I didn't make the
needinfo setting visually subordinate to the all flags setting. Instead it is
semantically subordinate.