diff options
author | Magnus Hagander | 2015-04-28 16:05:46 +0000 |
---|---|---|
committer | Magnus Hagander | 2015-04-28 16:05:46 +0000 |
commit | c6e940c1acc2e6c41fe809213a9b9c96a7ce63c2 (patch) | |
tree | 3e3ee7f2adb95e934fd7db93f8d4857ccd7c1634 | |
parent | 071869e855a8fab2cccc2c8adf48f32ed1acbca6 (diff) |
Rename "returned with feedback"->"move to next cf", add new "returned with feedback"
Returned with Feedback will now actually close the patch and *not* move it to
the next CF. Since it used to do that, all existing Returned with Feedback patches
are changed to Moved to next CF which does the same thing that Returned with
Feedback used to do. And of course, Moved to next CF is a new option available for
each patch from now on.
-rw-r--r-- | pgcommitfest/commitfest/fixtures/initial_data.json | 12 | ||||
-rw-r--r-- | pgcommitfest/commitfest/models.py | 9 | ||||
-rw-r--r-- | pgcommitfest/commitfest/static/commitfest/js/commitfest.js | 8 | ||||
-rw-r--r-- | pgcommitfest/commitfest/templates/patch_commands.inc | 1 | ||||
-rw-r--r-- | pgcommitfest/commitfest/views.py | 2 | ||||
-rw-r--r-- | pgcommitfest/urls.py | 2 |
6 files changed, 25 insertions, 9 deletions
diff --git a/pgcommitfest/commitfest/fixtures/initial_data.json b/pgcommitfest/commitfest/fixtures/initial_data.json index e33e662..5756e04 100644 --- a/pgcommitfest/commitfest/fixtures/initial_data.json +++ b/pgcommitfest/commitfest/fixtures/initial_data.json @@ -35,7 +35,7 @@ "pk": 5, "model": "commitfest.patchstatus", "fields": { - "statusstring": "Returned with Feedback", + "statusstring": "Moved to next CF", "sortkey": 30 } }, @@ -46,5 +46,13 @@ "statusstring": "Rejected", "sortkey": 50 } + }, + { + "pk": 7, + "model": "commitfest.patchstatus", + "fields": { + "statusstring": "Returned with Feedback", + "sortkey": 50 + } } -]
\ No newline at end of file +] diff --git a/pgcommitfest/commitfest/models.py b/pgcommitfest/commitfest/models.py index 6035027..23fe1fb 100644 --- a/pgcommitfest/commitfest/models.py +++ b/pgcommitfest/commitfest/models.py @@ -145,23 +145,26 @@ class PatchOnCommitFest(models.Model): STATUS_AUTHOR=2 STATUS_COMMITTER=3 STATUS_COMMITTED=4 - STATUS_RETURNED=5 + STATUS_NEXT=5 STATUS_REJECTED=6 + STATUS_RETURNED=7 _STATUS_CHOICES=( (STATUS_REVIEW, 'Needs review'), (STATUS_AUTHOR, 'Waiting on Author'), (STATUS_COMMITTER, 'Ready for Committer'), (STATUS_COMMITTED, 'Committed'), - (STATUS_RETURNED, 'Returned with Feedback'), + (STATUS_NEXT, 'Moved to next CF'), (STATUS_REJECTED, 'Rejected'), + (STATUS_RETURNED, 'Returned with feedback') ) _STATUS_LABELS=( (STATUS_REVIEW, 'default'), (STATUS_AUTHOR, 'primary'), (STATUS_COMMITTER, 'info'), (STATUS_COMMITTED, 'success'), - (STATUS_RETURNED, 'warning'), + (STATUS_NEXT, 'warning'), (STATUS_REJECTED, 'danger'), + (STATUS_RETURNED, 'danger'), ) OPEN_STATUSES=(STATUS_REVIEW, STATUS_AUTHOR, STATUS_COMMITTER) OPEN_STATUS_CHOICES=[x for x in _STATUS_CHOICES if x[0] in OPEN_STATUSES] diff --git a/pgcommitfest/commitfest/static/commitfest/js/commitfest.js b/pgcommitfest/commitfest/static/commitfest/js/commitfest.js index ce0df91..08701e1 100644 --- a/pgcommitfest/commitfest/static/commitfest/js/commitfest.js +++ b/pgcommitfest/commitfest/static/commitfest/js/commitfest.js @@ -1,10 +1,12 @@ function verify_reject() { - return confirm('Are you sure you want to close this patch as Rejected?\n\nThis should only be done when a patch will never be applied - if more work is needed, it should instead be set to "Returned with Feedback".\n\nSo - are you sure?'); + return confirm('Are you sure you want to close this patch as Rejected?\n\nThis should only be done when a patch will never be applied - if more work is needed, it should instead be set to "Returned with Feedback" or "Moved to next CF".\n\nSo - are you sure?'); } function verify_returned() { - return confirm('Are you sure you want to close this patch as Returned with Feedback?\n\nThis means the patch will be marked as closed in this commitfest, but will automatically be moved to the next one. If no further work is expected on this patch, it should be closed with "Rejected" istead.\n\nSo - are you sure?'); + return confirm('Are you sure you want to close this patch as Returned with Feedback?\n\nThis should be done if the patch is expected to be finished at some future time, but not necessarily in the next commitfest. If work is undergoing and expected in the next commitfest, it should instead be set to "Moved to next CF".\n\nSo - are you sure?'); +} +function verify_next() { + return confirm('Are you sure you want to move this patch to the next commitfest?\n\nThis means the patch will be marked as closed in this commitfest, but will automaticalliy be moved to the next one. If no further work is expected on this patch, it should be closed with "Rejected" or "Returned with Feedback" instead.\n\nSo - are you sure?'); } - function findLatestThreads() { $('#attachThreadListWrap').addClass('loading'); $('#attachThreadSearchButton').addClass('disabled'); diff --git a/pgcommitfest/commitfest/templates/patch_commands.inc b/pgcommitfest/commitfest/templates/patch_commands.inc index 71959ff..bb38e62 100644 --- a/pgcommitfest/commitfest/templates/patch_commands.inc +++ b/pgcommitfest/commitfest/templates/patch_commands.inc @@ -20,6 +20,7 @@ <li role="presentation" class="dropdown-header">Closed statuses</li> <li role="presentation"><a href="close/reject/" onclick="return verify_reject()">Rejected</a></li> <li role="presentation"><a href="close/feedback/" onclick="return verify_returned()">Returned with feedback</a></li> + <li role="presentation"><a href="close/next/" onclick="return verify_next()">Move to next CF</a></li> <li role="presentation"><a href="close/committed/" onclick="return flagCommitted({%if patch.committer%}'{{patch.committer}}'{%elif is_committer%}'{{user.username}}'{%else%}null{%endif%})">Committed</a></li> </ul> </div> diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py index 1b23454..ddc579a 100644 --- a/pgcommitfest/commitfest/views.py +++ b/pgcommitfest/commitfest/views.py @@ -444,6 +444,8 @@ def close(request, cfid, patchid, status): poc.status = PatchOnCommitFest.STATUS_REJECTED elif status == 'feedback': poc.status = PatchOnCommitFest.STATUS_RETURNED + elif status == 'next': + poc.status = PatchOnCommitFest.STATUS_NEXT # Figure out the commitfest to actually put it on newcf = CommitFest.objects.filter(status=CommitFest.STATUS_OPEN) if len(newcf) == 0: diff --git a/pgcommitfest/urls.py b/pgcommitfest/urls.py index 46e0332..4c2eb4e 100644 --- a/pgcommitfest/urls.py +++ b/pgcommitfest/urls.py @@ -15,7 +15,7 @@ urlpatterns = patterns('', url(r'^(\d+)/(\d+)/edit/$', 'commitfest.views.patchform'), url(r'^(\d+)/new/$', 'commitfest.views.newpatch'), url(r'^(\d+)/(\d+)/status/(review|author|committer)/$', 'commitfest.views.status'), - url(r'^(\d+)/(\d+)/close/(reject|feedback|committed)/$', 'commitfest.views.close'), + url(r'^(\d+)/(\d+)/close/(reject|feedback|committed|next)/$', 'commitfest.views.close'), url(r'^(\d+)/(\d+)/reviewer/(become|remove)/$', 'commitfest.views.reviewer'), url(r'^(\d+)/(\d+)/committer/(become|remove)/$', 'commitfest.views.committer'), url(r'^(\d+)/(\d+)/(comment|review)/', 'commitfest.views.comment'), |