blob: 1f67fc7b1d76074a13105f8c7ed9aa294ca1545d [file] [log] [blame]
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +02001= Gerrit Code Review - Attention Set
2
Ben Rohlfsd8192cc2020-07-30 09:06:55 +02003Report a bug or send feedback using
4link:https://bugs.chromium.org/p/gerrit/issues/entry?template=Attention+Set[this Monorail template].
Ben Rohlfse69d1fc2020-08-28 12:44:59 +02005You can also report a bug through the bug icon in the user hovercard and in the
6reply dialog.
Ben Rohlfsd8192cc2020-07-30 09:06:55 +02007
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +02008[[whose-turn]]
9== Whose turn is it?
10
11Code Review is a turn-based workflow going back and forth between the change
12owner and reviewers. For every change Gerrit maintains an "Attention Set" with
13users that are currently expected to act on the change. Both on the dashboard
Ben Rohlfsf6e338a2020-10-16 12:06:28 +020014and on the change page, this is expressed by an arrow icon before a (bolded)
15user name:
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020016
17image::images/user-attention-set-icon.png["account chip with attention icon", align="center"]
18
19While the attention set brings clarity to the process it also comes with
20responsibilities and expectations. To provide the best outcome for all users, we
21suggest following these principles:
22
23* Reviewers are expected to respond in a timely manner when it is their turn. If
24 you don't plan to respond within ~24h, then you should either remove yourself
25 from the attention set or you should at least send a clarification message to
26 the change owner.
27* Change owners are expected to manage the attention set of their changes
28 carefully. They should make sure that reviewers are only in the attention set
29 when the owner waits for a response from them.
30
31On the plus side you can strictly ignore everyone else's changes, if you are not
32in the attention set. :-)
33
Ben Rohlfs281279d2020-07-27 09:04:02 +020034=== Rules
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020035
36To help with the back and forth, Gerrit applies some basic automated rules for
37changing the attention set:
38
39* If reviewers are added to a change, then they are added to the attention set.
Ben Rohlfsf6e338a2020-10-16 12:06:28 +020040 * Exception: A reviewer adding themselves along with a comment or vote.
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020041* If an active change is submitted, abandoned or reset to "work in progress",
42 then all users are removed from the attention set.
43* Replying (commenting, voting or just writing a change message) removes the
Ben Rohlfsd8192cc2020-07-30 09:06:55 +020044 replying user from the attention set. And it adds all participants of comment
45 conversations that the user is replying to.
46* If a *reviewer* replies, then the change owner (and uploader) are added to the
47 attention set.
Ben Rohlfsf6e338a2020-10-16 12:06:28 +020048* For merged and abandoned changes the owner is added only when a human creates
49 an unresolved comment.
Gal Paikin6ce56dc2021-03-29 12:28:43 +020050* If another user removed a user's vote, the user with the deleted vote will be
51 added to the attention set.
Ben Rohlfsd8192cc2020-07-30 09:06:55 +020052* Only owner, uploader, reviewers and ccs can be in the attention set.
Gal Paikin1a816452021-03-11 12:40:23 +010053* The rules for service accounts are different, see link:#bots[Bots].
Gal Paikin102f6d82021-04-13 15:21:51 +020054* Users are not added by automatic rules when the change is work in progress.
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020055
56*!IMPORTANT!* These rules are not meant to be super smart and to always do the
57right thing, e.g. if the change owner sends a reply, then they are often
Ben Rohlfse69d1fc2020-08-28 12:44:59 +020058expected to individually select whose turn it is.
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020059
60Note that just uploading a new patchset is not a relevant event for the
61attention set to change.
62
Ben Rohlfs281279d2020-07-27 09:04:02 +020063=== Interaction
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020064
Ben Rohlfse69d1fc2020-08-28 12:44:59 +020065There are three ways to interact with the attention set: The attention icon,
66the hovercard of owner and reviewer chips and the "Reply" dialog.
67
68*The attention icon* can be used to quickly remove yourself (or someone else)
69from the attention set. Just click the icon, and it will disappear:
70
71image::images/user-attention-set-icon-click.png["attention set icon with tooltip", align="center"]
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020072
73*The hovercard* (on both the Dashboard and Change page) contains information
74about whether, why and when a user was added to the attention set. It also
75contains an action for adding/removing the user to/from the attention set.
76
77image::images/user-attention-set-hovercard.png["user hovercard with info and action", align="center"]
78
79*The reply dialog* contains a section for controlling to whom the turn should be
80passed.
81
82image::images/user-attention-set-reply-modify.png["reply dialog section for modifying", align="center"]
83
Ben Rohlfse69d1fc2020-08-28 12:44:59 +020084If you click "MODIFY", then the section will
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020085expand and you can select and de-select users by clicking on their chips.
86Whatever you select here will be the new state of the attention set for this
87change. As a change owner make sure to remove reviewers that you don't expect to
88take action.
89
90image::images/user-attention-set-reply-select.png["reply dialog section for selecting users", align="center"]
91
Gal Paikin1a816452021-03-11 12:40:23 +010092=== Bots [[bots]]
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020093
94The attention set is meant for human reviews only. Triggering bots and reacting
95to their results is a different workflow and not in scope of the attenion set.
Patrick Hiesele587c402020-08-07 16:11:29 +020096Thus members of the "Service Users" group will never be added to the
Ben Rohlfse69d1fc2020-08-28 12:44:59 +020097attention set. And replies by such users will only add the change owner (and
98uploader) to the attention set, if it comes along with a negative vote.
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020099
Ben Rohlfs281279d2020-07-27 09:04:02 +0200100=== Dashboard
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +0200101
102The default *dashboard* contains a new section at the top called "Your Turn". It
Ben Rohlfsf6e338a2020-10-16 12:06:28 +0200103lists all changes where the logged-in user is in the attention set. When you are
104a reviewer, the change is highlighted and is shown at the top of the section.
105The "Waiting" column indicates how long the owner has already been waiting for
106you to act.
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +0200107
108image::images/user-attention-set-dashboard.png["dashboard with Your Turn section", align="center"]
109
Ben Rohlfsf6e338a2020-10-16 12:06:28 +0200110As an active developer, one of your daily goals will be to iterate over this
111list and clear it.
Ben Rohlfse69d1fc2020-08-28 12:44:59 +0200112
113image::images/user-attention-set-dashboard-empty.png["dashboard with empty Your Turn section", align="center"]
114
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +0200115Note that you can also navigate to other users' dashboards to check their
116"Your Turn" section.
117
Ben Rohlfsf6e338a2020-10-16 12:06:28 +0200118=== Emails
119
120Every email begins with `Attention is currently required from: ...`, so you can
121identify at a glance whether you are expected to act.
122
123You can even change your email notification preferences in the user settings to
124only receive emails when you are in the attention set of a change:
125
126image::images/user-attention-set-user-prefs.png["user preference for email notifications", align="center"]
127
128If you prefer setting up customized filters in your mail client, then you can
129make use of the `Gerrit-Attention:` footer lines that are added for every user
130in the attention set, e.g.
131
132----
133Gerrit-Attention: Marian Harbach <mharbach@google.com>
134----
135
Ben Rohlfs281279d2020-07-27 09:04:02 +0200136=== Assignee
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +0200137
138While the "Assignee" feature can still be used together with the attention set,
139we do not recommend doing so. Using both features is likely confusing. The
140distinct feature of the "Assignee" compared to the attention set is that only
141one user can be the assignee at the same time. So the assignee can be used to
142single out one person or escalate, if there are multiple reviewers. Since
143*every* reviewer in the attention set is expected to take action, singling out
144is not likely to be important and also still achievable with the attention set.
145Otherwise "Assignee" and "Attention Set" are very much overlapping, so we
146recommend to only use one of them.
147
Ben Rohlfsf6e338a2020-10-16 12:06:28 +0200148If you don't expect action from reviewers, then consider adding them to CC
149instead.
150
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +0200151The "Assignee" feature can be turned on/off with the
David Ostrovsky8fd931d2021-04-30 15:45:00 +0200152link:config-gerrit.html#change.enableAssignee[enableAssignee] config option.
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +0200153
Ben Rohlfs281279d2020-07-27 09:04:02 +0200154=== Bold Changes / Mark Reviewed
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +0200155
156Before the attention set feature, changes were bolded in the dashboard when
157*something* happened and you could explicitly "mark a change reviewed" on the
158change page. This former way of keeping track of what you should look at has
159been replaced by the attention set.
160
Ben Rohlfsf6e338a2020-10-16 12:06:28 +0200161=== For Gerrit Admins
162
Jan Kundrátecbde332021-01-01 20:40:36 +0100163The Attention Set has been available since the 3.3 release (late 2020). It
Ben Rohlfs848ad1a2020-10-28 09:14:10 +0100164is enabled by default, but you can disable it by setting
165link:config-gerrit.html#change.enableAttentionSet[enableAttentionSet] to false.
Ben Rohlfsf6e338a2020-10-16 12:06:28 +0200166
Antoine Mussoc81f6682020-12-22 12:01:53 +0100167As part of Gerrit 3.3 upgrade, the user group "Non-Interactive Users" is
168renamed "Service Users". For a new installation, the group is automatically
169created upon initialization.
170
Gal Paikin8f3229d2020-10-20 16:36:39 +0300171=== Important note for all host owners, project owners, and bot owners
172
173If you are a host/project owner, please make sure all bots that run against your
Antoine Mussoc81f6682020-12-22 12:01:53 +0100174host/project are part of the link:access-control.html#service_users[Service Users] group.
Gal Paikin8f3229d2020-10-20 16:36:39 +0300175
176If you are a bot owner, please make sure your bot is part of the "Service Users"
177group on all hosts it runs on.
178
179To add users to the "Service Users" group, first ensure that the group exists on
180your host. If it doesn't, create it. The name must exactly be "Service Users".
181
182To create a group, use the Gerrit UI; BROWSE -> Groups -> CREATE NEW.
183
184Then, add the bots as members in this group. Alternatively, add an existing
185group that has multiple bots as a subgroup of "Service Users".
186
187To add members or subgroups, use the Gerrit UI; BROWSE -> Groups ->
188search for "Service Users" -> Members.
189
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +0200190GERRIT
191------
192Part of link:index.html[Gerrit Code Review]
193
194SEARCHBOX
195---------