blob: c4b8aa724a3ae8fba738584241b4d6128ab16871 [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].
5
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +02006[[whose-turn]]
7== Whose turn is it?
8
9Code Review is a turn-based workflow going back and forth between the change
10owner and reviewers. For every change Gerrit maintains an "Attention Set" with
11users that are currently expected to act on the change. Both on the dashboard
Ben Rohlfsf6e338a2020-10-16 12:06:28 +020012and on the change page, this is expressed by an arrow icon before a (bolded)
13user name:
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020014
15image::images/user-attention-set-icon.png["account chip with attention icon", align="center"]
16
17While the attention set brings clarity to the process it also comes with
18responsibilities and expectations. To provide the best outcome for all users, we
19suggest following these principles:
20
21* Reviewers are expected to respond in a timely manner when it is their turn. If
22 you don't plan to respond within ~24h, then you should either remove yourself
23 from the attention set or you should at least send a clarification message to
24 the change owner.
25* Change owners are expected to manage the attention set of their changes
26 carefully. They should make sure that reviewers are only in the attention set
27 when the owner waits for a response from them.
28
29On the plus side you can strictly ignore everyone else's changes, if you are not
30in the attention set. :-)
31
Ben Rohlfs281279d2020-07-27 09:04:02 +020032=== Rules
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020033
34To help with the back and forth, Gerrit applies some basic automated rules for
35changing the attention set:
36
37* If reviewers are added to a change, then they are added to the attention set.
Ben Rohlfsf6e338a2020-10-16 12:06:28 +020038 * Exception: A reviewer adding themselves along with a comment or vote.
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020039* If an active change is submitted, abandoned or reset to "work in progress",
40 then all users are removed from the attention set.
41* Replying (commenting, voting or just writing a change message) removes the
Ben Rohlfsd8192cc2020-07-30 09:06:55 +020042 replying user from the attention set. And it adds all participants of comment
43 conversations that the user is replying to.
44* If a *reviewer* replies, then the change owner (and uploader) are added to the
45 attention set.
Ben Rohlfsf6e338a2020-10-16 12:06:28 +020046* For merged and abandoned changes the owner is added only when a human creates
47 an unresolved comment.
Gal Paikin6ce56dc2021-03-29 12:28:43 +020048* If another user removed a user's vote, the user with the deleted vote will be
49 added to the attention set.
Edwin Kempinc17b5a82022-04-25 14:06:13 +020050* If a vote becomes outdated by uploading a new patch set (vote is not sticky),
51 the user whose vote has been removed is added to the attention set, as they
52 need to re-review the change and vote newly.
Ben Rohlfsd8192cc2020-07-30 09:06:55 +020053* Only owner, uploader, reviewers and ccs can be in the attention set.
Gal Paikin1a816452021-03-11 12:40:23 +010054* The rules for service accounts are different, see link:#bots[Bots].
Gal Paikin102f6d82021-04-13 15:21:51 +020055* Users are not added by automatic rules when the change is work in progress.
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020056
57*!IMPORTANT!* These rules are not meant to be super smart and to always do the
58right thing, e.g. if the change owner sends a reply, then they are often
Ben Rohlfse69d1fc2020-08-28 12:44:59 +020059expected to individually select whose turn it is.
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020060
61Note that just uploading a new patchset is not a relevant event for the
62attention set to change.
63
Ben Rohlfs281279d2020-07-27 09:04:02 +020064=== Interaction
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020065
Ben Rohlfse69d1fc2020-08-28 12:44:59 +020066There are three ways to interact with the attention set: The attention icon,
67the hovercard of owner and reviewer chips and the "Reply" dialog.
68
69*The attention icon* can be used to quickly remove yourself (or someone else)
70from the attention set. Just click the icon, and it will disappear:
71
72image::images/user-attention-set-icon-click.png["attention set icon with tooltip", align="center"]
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020073
74*The hovercard* (on both the Dashboard and Change page) contains information
75about whether, why and when a user was added to the attention set. It also
76contains an action for adding/removing the user to/from the attention set.
77
78image::images/user-attention-set-hovercard.png["user hovercard with info and action", align="center"]
79
80*The reply dialog* contains a section for controlling to whom the turn should be
81passed.
82
83image::images/user-attention-set-reply-modify.png["reply dialog section for modifying", align="center"]
84
Ben Rohlfse69d1fc2020-08-28 12:44:59 +020085If you click "MODIFY", then the section will
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020086expand and you can select and de-select users by clicking on their chips.
87Whatever you select here will be the new state of the attention set for this
88change. As a change owner make sure to remove reviewers that you don't expect to
89take action.
90
91image::images/user-attention-set-reply-select.png["reply dialog section for selecting users", align="center"]
92
Gal Paikin1a816452021-03-11 12:40:23 +010093=== Bots [[bots]]
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +020094
95The attention set is meant for human reviews only. Triggering bots and reacting
96to their results is a different workflow and not in scope of the attenion set.
Patrick Hiesele587c402020-08-07 16:11:29 +020097Thus members of the "Service Users" group will never be added to the
Ben Rohlfse69d1fc2020-08-28 12:44:59 +020098attention set. And replies by such users will only add the change owner (and
99uploader) to the attention set, if it comes along with a negative vote.
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +0200100
Ben Rohlfs281279d2020-07-27 09:04:02 +0200101=== Dashboard
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +0200102
103The default *dashboard* contains a new section at the top called "Your Turn". It
Ben Rohlfsf6e338a2020-10-16 12:06:28 +0200104lists all changes where the logged-in user is in the attention set. When you are
105a reviewer, the change is highlighted and is shown at the top of the section.
106The "Waiting" column indicates how long the owner has already been waiting for
107you to act.
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +0200108
109image::images/user-attention-set-dashboard.png["dashboard with Your Turn section", align="center"]
110
Ben Rohlfsf6e338a2020-10-16 12:06:28 +0200111As an active developer, one of your daily goals will be to iterate over this
112list and clear it.
Ben Rohlfse69d1fc2020-08-28 12:44:59 +0200113
114image::images/user-attention-set-dashboard-empty.png["dashboard with empty Your Turn section", align="center"]
115
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +0200116Note that you can also navigate to other users' dashboards to check their
117"Your Turn" section.
118
Ben Rohlfsf6e338a2020-10-16 12:06:28 +0200119=== Emails
120
121Every email begins with `Attention is currently required from: ...`, so you can
122identify at a glance whether you are expected to act.
123
124You can even change your email notification preferences in the user settings to
125only receive emails when you are in the attention set of a change:
126
127image::images/user-attention-set-user-prefs.png["user preference for email notifications", align="center"]
128
129If you prefer setting up customized filters in your mail client, then you can
130make use of the `Gerrit-Attention:` footer lines that are added for every user
131in the attention set, e.g.
132
133----
134Gerrit-Attention: Marian Harbach <mharbach@google.com>
135----
136
Milutin Kristofic38c77082022-11-29 20:28:29 +0100137=== Browser notifications
138
139You'll automatically get notifications when you are in the attention set. You
140must enable desktop notifications on your browser to see them.
141
142image::images/browser-notification-example.png["browser notification example", align="center"]
143
144You can turn off automatic notifications in user preferences. They are enabled
145by default.
146
147image::images/browser-notification-preference.png["user preference for browser notifications", align="center"]
148
149Current implementation works only when gerrit is open in one of the tabs. We
150poll every 5 minutes for changes in attention set.
151
Ben Rohlfs281279d2020-07-27 09:04:02 +0200152=== Bold Changes / Mark Reviewed
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +0200153
154Before the attention set feature, changes were bolded in the dashboard when
155*something* happened and you could explicitly "mark a change reviewed" on the
156change page. This former way of keeping track of what you should look at has
157been replaced by the attention set.
158
Ben Rohlfsf6e338a2020-10-16 12:06:28 +0200159=== For Gerrit Admins
160
Jan Kundrátecbde332021-01-01 20:40:36 +0100161The Attention Set has been available since the 3.3 release (late 2020). It
Ben Rohlfs848ad1a2020-10-28 09:14:10 +0100162is enabled by default, but you can disable it by setting
163link:config-gerrit.html#change.enableAttentionSet[enableAttentionSet] to false.
Ben Rohlfsf6e338a2020-10-16 12:06:28 +0200164
Antoine Mussoc81f6682020-12-22 12:01:53 +0100165As part of Gerrit 3.3 upgrade, the user group "Non-Interactive Users" is
166renamed "Service Users". For a new installation, the group is automatically
167created upon initialization.
168
Gal Paikin8f3229d2020-10-20 16:36:39 +0300169=== Important note for all host owners, project owners, and bot owners
170
171If you are a host/project owner, please make sure all bots that run against your
Antoine Mussoc81f6682020-12-22 12:01:53 +0100172host/project are part of the link:access-control.html#service_users[Service Users] group.
Gal Paikin8f3229d2020-10-20 16:36:39 +0300173
174If you are a bot owner, please make sure your bot is part of the "Service Users"
175group on all hosts it runs on.
176
177To add users to the "Service Users" group, first ensure that the group exists on
178your host. If it doesn't, create it. The name must exactly be "Service Users".
179
180To create a group, use the Gerrit UI; BROWSE -> Groups -> CREATE NEW.
181
182Then, add the bots as members in this group. Alternatively, add an existing
183group that has multiple bots as a subgroup of "Service Users".
184
185To add members or subgroups, use the Gerrit UI; BROWSE -> Groups ->
186search for "Service Users" -> Members.
187
Ben Rohlfsb5f82ee2020-07-22 17:15:58 +0200188GERRIT
189------
190Part of link:index.html[Gerrit Code Review]
191
192SEARCHBOX
193---------