Merge "Add new notify type that allows watching abandoning of changes"
This commit is contained in:
@@ -95,6 +95,7 @@ are sent.
|
|||||||
* `new_patchsets`: Only newly created patch sets.
|
* `new_patchsets`: Only newly created patch sets.
|
||||||
* `all_comments`: Only comments on existing changes.
|
* `all_comments`: Only comments on existing changes.
|
||||||
* `submitted_changes`: Only changes that have been submitted.
|
* `submitted_changes`: Only changes that have been submitted.
|
||||||
|
* `abandoned_changes`: Only changes that have been abandoned.
|
||||||
* `all`: All notifications.
|
* `all`: All notifications.
|
||||||
|
|
||||||
+
|
+
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ public interface AccountConstants extends Constants {
|
|||||||
String watchedProjectColumnNewPatchSets();
|
String watchedProjectColumnNewPatchSets();
|
||||||
String watchedProjectColumnAllComments();
|
String watchedProjectColumnAllComments();
|
||||||
String watchedProjectColumnSubmittedChanges();
|
String watchedProjectColumnSubmittedChanges();
|
||||||
|
String watchedProjectColumnAbandonedChanges();
|
||||||
|
|
||||||
String contactFieldFullName();
|
String contactFieldFullName();
|
||||||
String contactFieldEmail();
|
String contactFieldEmail();
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ watchedProjectColumnNewChanges = New Changes
|
|||||||
watchedProjectColumnNewPatchSets = New Patch Sets
|
watchedProjectColumnNewPatchSets = New Patch Sets
|
||||||
watchedProjectColumnAllComments = All Comments
|
watchedProjectColumnAllComments = All Comments
|
||||||
watchedProjectColumnSubmittedChanges = Submitted Changes
|
watchedProjectColumnSubmittedChanges = Submitted Changes
|
||||||
|
watchedProjectColumnAbandonedChanges = Abandoned Changes
|
||||||
|
|
||||||
contactFieldFullName = Full Name
|
contactFieldFullName = Full Name
|
||||||
contactFieldEmail = Preferred Email
|
contactFieldEmail = Preferred Email
|
||||||
|
|||||||
@@ -51,15 +51,17 @@ public class MyWatchesTable extends FancyFlexTable<AccountProjectWatchInfo> {
|
|||||||
fmt.setRowSpan(0, 2, 2);
|
fmt.setRowSpan(0, 2, 2);
|
||||||
DOM.setElementProperty(fmt.getElement(0, 3), "align", "center");
|
DOM.setElementProperty(fmt.getElement(0, 3), "align", "center");
|
||||||
|
|
||||||
fmt.setColSpan(0, 3, 4);
|
fmt.setColSpan(0, 3, 5);
|
||||||
table.setText(1, 0, Util.C.watchedProjectColumnNewChanges());
|
table.setText(1, 0, Util.C.watchedProjectColumnNewChanges());
|
||||||
table.setText(1, 1, Util.C.watchedProjectColumnNewPatchSets());
|
table.setText(1, 1, Util.C.watchedProjectColumnNewPatchSets());
|
||||||
table.setText(1, 2, Util.C.watchedProjectColumnAllComments());
|
table.setText(1, 2, Util.C.watchedProjectColumnAllComments());
|
||||||
table.setText(1, 3, Util.C.watchedProjectColumnSubmittedChanges());
|
table.setText(1, 3, Util.C.watchedProjectColumnSubmittedChanges());
|
||||||
|
table.setText(1, 4, Util.C.watchedProjectColumnAbandonedChanges());
|
||||||
fmt.addStyleName(1, 0, Gerrit.RESOURCES.css().dataHeader());
|
fmt.addStyleName(1, 0, Gerrit.RESOURCES.css().dataHeader());
|
||||||
fmt.addStyleName(1, 1, Gerrit.RESOURCES.css().dataHeader());
|
fmt.addStyleName(1, 1, Gerrit.RESOURCES.css().dataHeader());
|
||||||
fmt.addStyleName(1, 2, Gerrit.RESOURCES.css().dataHeader());
|
fmt.addStyleName(1, 2, Gerrit.RESOURCES.css().dataHeader());
|
||||||
fmt.addStyleName(1, 3, Gerrit.RESOURCES.css().dataHeader());
|
fmt.addStyleName(1, 3, Gerrit.RESOURCES.css().dataHeader());
|
||||||
|
fmt.addStyleName(1, 4, Gerrit.RESOURCES.css().dataHeader());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteChecked() {
|
public void deleteChecked() {
|
||||||
@@ -140,6 +142,7 @@ public class MyWatchesTable extends FancyFlexTable<AccountProjectWatchInfo> {
|
|||||||
addNotifyButton(AccountProjectWatch.NotifyType.NEW_PATCHSETS, info, row, 4);
|
addNotifyButton(AccountProjectWatch.NotifyType.NEW_PATCHSETS, info, row, 4);
|
||||||
addNotifyButton(AccountProjectWatch.NotifyType.ALL_COMMENTS, info, row, 5);
|
addNotifyButton(AccountProjectWatch.NotifyType.ALL_COMMENTS, info, row, 5);
|
||||||
addNotifyButton(AccountProjectWatch.NotifyType.SUBMITTED_CHANGES, info, row, 6);
|
addNotifyButton(AccountProjectWatch.NotifyType.SUBMITTED_CHANGES, info, row, 6);
|
||||||
|
addNotifyButton(AccountProjectWatch.NotifyType.ABANDONED_CHANGES, info, row, 7);
|
||||||
|
|
||||||
final FlexCellFormatter fmt = table.getFlexCellFormatter();
|
final FlexCellFormatter fmt = table.getFlexCellFormatter();
|
||||||
fmt.addStyleName(row, 1, Gerrit.RESOURCES.css().iconCell());
|
fmt.addStyleName(row, 1, Gerrit.RESOURCES.css().iconCell());
|
||||||
@@ -148,6 +151,7 @@ public class MyWatchesTable extends FancyFlexTable<AccountProjectWatchInfo> {
|
|||||||
fmt.addStyleName(row, 4, Gerrit.RESOURCES.css().dataCell());
|
fmt.addStyleName(row, 4, Gerrit.RESOURCES.css().dataCell());
|
||||||
fmt.addStyleName(row, 5, Gerrit.RESOURCES.css().dataCell());
|
fmt.addStyleName(row, 5, Gerrit.RESOURCES.css().dataCell());
|
||||||
fmt.addStyleName(row, 6, Gerrit.RESOURCES.css().dataCell());
|
fmt.addStyleName(row, 6, Gerrit.RESOURCES.css().dataCell());
|
||||||
|
fmt.addStyleName(row, 7, Gerrit.RESOURCES.css().dataCell());
|
||||||
|
|
||||||
setRowItem(row, info);
|
setRowItem(row, info);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ import com.google.gwtorm.client.StringKey;
|
|||||||
public final class AccountProjectWatch {
|
public final class AccountProjectWatch {
|
||||||
|
|
||||||
public enum NotifyType {
|
public enum NotifyType {
|
||||||
NEW_CHANGES, NEW_PATCHSETS, ALL_COMMENTS, SUBMITTED_CHANGES, ALL
|
NEW_CHANGES, NEW_PATCHSETS, ALL_COMMENTS, SUBMITTED_CHANGES,
|
||||||
|
ABANDONED_CHANGES, ALL
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String FILTER_ALL = "*";
|
public static final String FILTER_ALL = "*";
|
||||||
@@ -112,6 +113,9 @@ public final class AccountProjectWatch {
|
|||||||
@Column(id = 5)
|
@Column(id = 5)
|
||||||
protected boolean notifyNewPatchSets;
|
protected boolean notifyNewPatchSets;
|
||||||
|
|
||||||
|
@Column(id = 6)
|
||||||
|
protected boolean notifyAbandonedChanges;
|
||||||
|
|
||||||
protected AccountProjectWatch() {
|
protected AccountProjectWatch() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,6 +153,9 @@ public final class AccountProjectWatch {
|
|||||||
case SUBMITTED_CHANGES:
|
case SUBMITTED_CHANGES:
|
||||||
return notifySubmittedChanges;
|
return notifySubmittedChanges;
|
||||||
|
|
||||||
|
case ABANDONED_CHANGES:
|
||||||
|
return notifyAbandonedChanges;
|
||||||
|
|
||||||
case ALL:
|
case ALL:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -173,11 +180,16 @@ public final class AccountProjectWatch {
|
|||||||
notifySubmittedChanges = v;
|
notifySubmittedChanges = v;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ABANDONED_CHANGES:
|
||||||
|
notifyAbandonedChanges = v;
|
||||||
|
break;
|
||||||
|
|
||||||
case ALL:
|
case ALL:
|
||||||
notifyNewChanges = v;
|
notifyNewChanges = v;
|
||||||
notifyNewPatchSets = v;
|
notifyNewPatchSets = v;
|
||||||
notifyAllComments = v;
|
notifyAllComments = v;
|
||||||
notifySubmittedChanges = v;
|
notifySubmittedChanges = v;
|
||||||
|
notifyAbandonedChanges = v;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ public class AbandonedSender extends ReplyToChangeSender {
|
|||||||
|
|
||||||
ccAllApprovals();
|
ccAllApprovals();
|
||||||
bccStarredBy();
|
bccStarredBy();
|
||||||
|
includeWatchers(NotifyType.ABANDONED_CHANGES);
|
||||||
includeWatchers(NotifyType.ALL_COMMENTS);
|
includeWatchers(NotifyType.ALL_COMMENTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import java.util.List;
|
|||||||
/** A version of the database schema. */
|
/** A version of the database schema. */
|
||||||
public abstract class SchemaVersion {
|
public abstract class SchemaVersion {
|
||||||
/** The current schema version. */
|
/** The current schema version. */
|
||||||
public static final Class<Schema_75> C = Schema_75.class;
|
public static final Class<Schema_76> C = Schema_76.class;
|
||||||
|
|
||||||
public static class Module extends AbstractModule {
|
public static class Module extends AbstractModule {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
// Copyright (C) 2013 The Android Open Source Project
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
package com.google.gerrit.server.schema;
|
||||||
|
|
||||||
|
import com.google.inject.Inject;
|
||||||
|
import com.google.inject.Provider;
|
||||||
|
|
||||||
|
public class Schema_76 extends SchemaVersion {
|
||||||
|
@Inject
|
||||||
|
Schema_76(Provider<Schema_75> prior) {
|
||||||
|
super(prior);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user