Verified
Status Update
Comments
al...@gmail.com <al...@gmail.com> #2
*** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!! *** Do not submit bugs for chrome/android and issues with your company's *** Gerrit setup here. Those issues belong in different issue trackers.
What steps will reproduce the problem?
- Add a copy-condition 'is:MAX' on Code-Review label
- Create a change and add a Code-Review+2 vote
- Add a second patchset on the change
- Query the change using SSH with --current-patch-set --patch-sets --all-approvals --format=JSON
What is the expected output? Under 'patchSets' section, the second patchset contains Code-Review+2 approval
What do you see instead? Second patchset does not contain Code-Review+2 approval
Please provide any additional information below. Copied approvals only show up in the 'currentPatchSet' section. Notedb does have the vote as a Copied-Label on 2nd patchset though.
py...@gmail.com <py...@gmail.com> #3
2
ap...@google.com <ap...@google.com> #4
Project: gerrit
Branch: stable-3.5
commit 002afb0f0815aada066b6d3d7d98c522d5f2757f
Author: Kaushik Lingarkar <kaushik.lingarkar@linaro.org>
Date: Tue Aug 29 12:24:55 2023
SSH Query: Show copied approvals on respective patchsets
Copied approvals are currently only shown on the current patch-set.
CI systems parsing the query result to get approvals on non-current
patch-sets will run into issues if copied approvals are not returned
on respective patch-sets.
Release-Notes: SSH queries now show copied approvals on respective patch-sets
Bug: Issue 295457464
Change-Id: I40a605be7f27c70233d94130ae6c5aba22e8818c
M java/com/google/gerrit/server/approval/ApprovalsUtil.java
M java/com/google/gerrit/server/query/change/ChangeData.java
M java/com/google/gerrit/server/query/change/OutputStreamQuery.java
M javatests/com/google/gerrit/acceptance/ssh/QueryIT.java
https://gerrit-review.googlesource.com/383255
Branch: stable-3.5
commit 002afb0f0815aada066b6d3d7d98c522d5f2757f
Author: Kaushik Lingarkar <kaushik.lingarkar@linaro.org>
Date: Tue Aug 29 12:24:55 2023
SSH Query: Show copied approvals on respective patchsets
Copied approvals are currently only shown on the current patch-set.
CI systems parsing the query result to get approvals on non-current
patch-sets will run into issues if copied approvals are not returned
on respective patch-sets.
Release-Notes: SSH queries now show copied approvals on respective patch-sets
Bug:
Change-Id: I40a605be7f27c70233d94130ae6c5aba22e8818c
M java/com/google/gerrit/server/approval/ApprovalsUtil.java
M java/com/google/gerrit/server/query/change/ChangeData.java
M java/com/google/gerrit/server/query/change/OutputStreamQuery.java
M javatests/com/google/gerrit/acceptance/ssh/QueryIT.java
Description
*** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!!
*** Do not submit bugs for chrome/android and issues with your company's
*** Gerrit setup here. Those issues belong in different issue trackers.
*************************************************************************
What steps will reproduce the problem?
1. Add a copy-condition 'is:MAX' on Code-Review label
2. Create a change and add a Code-Review+2 vote
3. Add a second patchset on the change
4. Query the change using SSH with --current-patch-set --patch-sets --all-approvals --format=JSON
What is the expected output?
Under 'patchSets' section, the second patchset contains Code-Review+2 approval
What do you see instead?
Second patchset does not contain Code-Review+2 approval
Please provide any additional information below.
Copied approvals only show up in the 'currentPatchSet' section. Notedb does have the vote as a Copied-Label on 2nd patchset though.