Bug 518492 - Improve user flow for fetching a change from Gerrit
Summary: Improve user flow for fetching a change from Gerrit
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: 4.9.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2017-06-20 04:41 EDT by Lars Vogel CLA
Modified: 2017-07-06 16:20 EDT (History)
3 users (show)

See Also:


Attachments
Screenshot (52.13 KB, image/png)
2017-07-04 01:57 EDT, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2017-06-20 04:41:44 EDT
The current user flow of the Fetch a change from Gerrit dialog could be IMHO improved.
Unfortunately, I don't know exactly what the optional workflow should look like, so what follow is a suggestion. Maybe you have a better idea?

Currently:

I copy a change ID into clipboard, e.g., 96882
I open the dialog and the change fields get populated with 96882 which is good
The dialog now downloads the valid Gerrit URLs

All good so far. Here is the part of the flow which could IMHO be improved:

Once finished, I have to use CTRL+Space to get the correct Gerrit URL. In most cases, I pick the latest change set.

Suggestion:

Maybe you could set the change ID to the latest patch set after downloading the Gerrits? This way I could press "Finish" without having to interact with the change field in most cases.
 
If you do this, I suggest having CTRL+Space also available with a populated change field.

WDYT?
Comment 1 Thomas Wolf CLA 2017-06-20 04:56:37 EDT
+1

I have noticed that, too, and have thought about it. But so far not implemented anything.

There's even another possibility:

We currently detect the change number from the clipboard contents. We could also try to detect the patch set number and if we have one, use that or maybe even construct the ref/changes/dd/ddddd/ps directly without asking the Gerrit server. If the user starts the fetch before the git ls-remote returns, we'd just try it: the server would complain if there was no such patch set. And if the ls-remote is complete before the user continues, we can validate the ref before trying to fetch it.

And if there is no ps (patch set number) in the user input but we do have a change nuber, we could indeed auto-fill the latest one obtained from ls-remote.

Having ctrl-space work also when the field already contains a ref/changes... string is something separate; factored out as bug 518495.
Comment 2 Lars Vogel CLA 2017-06-20 05:02:08 EDT
(In reply to Thomas Wolf from comment #1)
> +1

> And if there is no ps (patch set number) in the user input but we do have a
> change nuber, we could indeed auto-fill the latest one obtained from
> ls-remote.

+1 for this proposal. If I understand this correctly, this would allow pressing "Finished" without waiting for the dialog to fetch valid reviews which would be a nice improvement.
Comment 3 Eclipse Genie CLA 2017-06-20 08:23:13 EDT
New Gerrit change created: https://git.eclipse.org/r/99661
Comment 4 Eclipse Genie CLA 2017-06-28 05:11:09 EDT
Gerrit change https://git.eclipse.org/r/99661 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=de432f48f6b167604ad8c84045865757e1219a46
Comment 5 Lars Vogel CLA 2017-06-28 17:21:27 EDT
(In reply to Eclipse Genie from comment #4)
> Gerrit change https://git.eclipse.org/r/99661 was merged to [master].
> Commit:
> http://git.eclipse.org/c/egit/egit.git/commit/
> ?id=de432f48f6b167604ad8c84045865757e1219a46

AFAICS the following is not yet available with Egit 4.9.0.201706280916

> And if there is no ps (patch set number) in the user input but we do have a
> change nuber, we could indeed auto-fill the latest one obtained from
> ls-remote.
Comment 6 Thomas Wolf CLA 2017-06-29 04:05:27 EDT
(In reply to Lars Vogel from comment #5)
> AFAICS the following is not yet available with Egit 4.9.0.201706280916
> 
> [auto-supply patch set number]

Correct. I didn't mark the report as "resolved" yet, did I?
Comment 7 Lars Vogel CLA 2017-06-29 04:52:21 EDT
(In reply to Thomas Wolf from comment #6)
> Correct. I didn't mark the report as "resolved" yet, did I?

Sorry for the noise on my side.
Comment 8 Eclipse Genie CLA 2017-06-29 06:22:16 EDT
New Gerrit change created: https://git.eclipse.org/r/100339
Comment 9 Eclipse Genie CLA 2017-06-30 17:54:24 EDT
Gerrit change https://git.eclipse.org/r/100339 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=47ce5ae6d4a6b6e092bf87d1de09043de8d4611a
Comment 10 Lars Vogel CLA 2017-07-04 01:56:58 EDT
In nightly I still cannot press "Finish" after pasting a Change ID (96885) into the field. Reopening.
Comment 11 Lars Vogel CLA 2017-07-04 01:57:20 EDT
Created attachment 269182 [details]
Screenshot
Comment 12 Thomas Wolf CLA 2017-07-04 02:02:37 EDT
(In reply to Lars Vogel from comment #10)
> In nightly I still cannot press "Finish" after pasting a Change ID (96885)
> into the field. Reopening.

Well, what do you expect? If you give only a change number, we first have to query the server about patch sets to determine the highest patch set number.

Your original request even stated so: "Maybe you could set the change ID to the latest patch set after downloading the Gerrits?"

In your screenshot, the git ls-remote command is still in progress.
Comment 13 Lars Vogel CLA 2017-07-04 02:06:08 EDT
(In reply to Thomas Wolf from comment #12)
> Your original request even stated so: "Maybe you could set the change ID to
> the latest patch set after downloading the Gerrits?"

If the user enters a change id 96885 and presses finish the system could use the latest patch set for example refs/changes/85/96885/3 after downloading the patches (without additional user interaction). The idea was that the user is not blocked during the download and the insert can happen automatically after its available.
Comment 14 Eclipse Genie CLA 2017-07-05 03:36:30 EDT
New Gerrit change created: https://git.eclipse.org/r/100677
Comment 15 Eclipse Genie CLA 2017-07-06 16:19:46 EDT
Gerrit change https://git.eclipse.org/r/100677 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=937847a996f12a6ff1c17ce77cfba43d8e1dbf19