You can end up with multiple jobs selected using Ctrl/Cmd click to pin

RESOLVED FIXED

Status

P5
minor
RESOLVED FIXED
4 years ago
a year ago

People

(Reporter: jfrench, Assigned: oikiki)

Tracking

({good-first-bug})

Details

(URL)

Attachments

(3 attachments)

(Reporter)

Description

4 years ago
It seems you can end up with two jobs styled as selected, with a particular workflow and possibly a particular OS (I am running EOL XP SP3).

To reproduce
o open production http://treeherder.mozilla.org
o Click any job
o Ctrl-click any _2nd job to pinboard it
o Click again on that 2nd job

Expected Behavior
I think - the first job would get styled deselected when step 3) is invoked.

Observed
Both jobs appear selected.

I checked in w/camd on IRC. Perhaps someone else can try on WinXP/7/8 to see if they can reproduce it or not, depending on their flavor of OS.
(Reporter)

Comment 1

4 years ago
Created attachment 8483639 [details]
twoJobsSelected

Observed behavior attached.

Updated

4 years ago
Priority: P4 → P3

Updated

4 years ago
Priority: P3 → P4
(Reporter)

Updated

3 years ago
Summary: You can end up with two jobs selected with particular workflow (and/or OS) → You can end up with multiple jobs selected using Ctrl/Cmd click to pin
(Reporter)

Comment 2

3 years ago
Created attachment 8638768 [details]
multipleStyledSelected

Noting also, it's possible to have more than two as originally reported.

I suspect most users favor spacebar for pinning, based on the lack of complaints about this behavior.
I can confirm that the behavior is as described in comment 0, but I'm not exactly sure that's not the desired behavior. If you want to deselect JobA when you ctrl-click JobB, you probably want to select JobB at the same point it gets pinned. If you want to use ctrl-click to rapidly select multiple jobs, you'd then have to wait for job details to load for each job you click, adding significant delays to your clicking.

Anyway, https://github.com/mozilla/treeherder/blob/0300fb69bad7223585fd9e9c885b5a159b292221/ui/js/directives/treeherder/clonejobs.js#L399-L403 is where these are controlled. If we want to fix this bug, we'd just need to also call clickJobCb() somewhere in/after togglePinJobCb().
Still happens.  But pretty benign.  On a mac, you use the option-click to do reproduce this.
Keywords: good-first-bug
Priority: P4 → P5
Assigning to Kiki as an Outreachy assessment.
Assignee: nobody → kikis.github
(Assignee)

Comment 6

a year ago
I was able to reproduce this both in production and locally on a mac with cmd-click.  Fix forthcoming.
Created attachment 8916831 [details] [review]
[treeherder] kikisdeliveryservice:Bug_1062463_Fix > mozilla:master
(Assignee)

Comment 8

a year ago
PR submitted, all Travis CI checks passed.

Please let me know if you have any questions or comments.

Updated

a year ago
Attachment #8916831 - Flags: review?(cdawson)
Comment on attachment 8916831 [details] [review]
[treeherder] kikisdeliveryservice:Bug_1062463_Fix > mozilla:master

This works great!  Would you now squash the commits and add the bug number to the single commit?  Thanks!  :)
Attachment #8916831 - Flags: review?(cdawson) → review+

Updated

a year ago
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.