Allow evaluating submit rules for draft changes

When actually submitting changes, we should continue short-circuiting
and refusing to say draft changes are submittable. But for purely
informational pre-submit operations, such as rendering the approval
table, it makes sense to treat draft changes the same as any other
open changes.

Change-Id: I012c274c3e6a4b95adead3008a9c0ff56942d56b
This commit is contained in:
Dave Borowitz
2013-03-22 15:42:23 -07:00
parent a30db916df
commit 09479a61d7
4 changed files with 27 additions and 24 deletions

View File

@@ -100,7 +100,8 @@ public class ReviewerJson {
ChangeData cd = new ChangeData(ctl);
PatchSet ps = cd.currentPatchSet(db);
if (ps != null) {
for (SubmitRecord rec : ctl.canSubmit(db.get(), ps, cd, true, false)) {
for (SubmitRecord rec :
ctl.canSubmit(db.get(), ps, cd, true, false, true)) {
if (rec.labels == null) {
continue;
}