Add new notify type that allows watching abandoning of changes

Users can now watch the abandoning of changes.

Watching 'all_comments' already includes notification on abandoning of
changes, but some users that watch 'new_changes' want to get
notified on abandon without getting notifications for all other
comments.

Bug: issue 1686
Change-Id: I910a3adf41e6e979400523eb923ff9780ca77853
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2013-01-11 08:10:52 +01:00
committed by Edwin Kempin
parent 89136bc832
commit 3a82961084
8 changed files with 48 additions and 3 deletions

View File

@@ -22,7 +22,8 @@ import com.google.gwtorm.client.StringKey;
public final class AccountProjectWatch {
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 = "*";
@@ -112,6 +113,9 @@ public final class AccountProjectWatch {
@Column(id = 5)
protected boolean notifyNewPatchSets;
@Column(id = 6)
protected boolean notifyAbandonedChanges;
protected AccountProjectWatch() {
}
@@ -149,6 +153,9 @@ public final class AccountProjectWatch {
case SUBMITTED_CHANGES:
return notifySubmittedChanges;
case ABANDONED_CHANGES:
return notifyAbandonedChanges;
case ALL:
break;
}
@@ -173,11 +180,16 @@ public final class AccountProjectWatch {
notifySubmittedChanges = v;
break;
case ABANDONED_CHANGES:
notifyAbandonedChanges = v;
break;
case ALL:
notifyNewChanges = v;
notifyNewPatchSets = v;
notifyAllComments = v;
notifySubmittedChanges = v;
notifyAbandonedChanges = v;
break;
}
}