Rename "returned with feedback"->"move to next cf", add new "returned with feedback"
authorMagnus Hagander <magnus@hagander.net>
Tue, 28 Apr 2015 16:05:46 +0000 (18:05 +0200)
committerMagnus Hagander <magnus@hagander.net>
Tue, 28 Apr 2015 16:05:46 +0000 (18:05 +0200)
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.

pgcommitfest/commitfest/fixtures/initial_data.json
pgcommitfest/commitfest/models.py
pgcommitfest/commitfest/static/commitfest/js/commitfest.js
pgcommitfest/commitfest/templates/patch_commands.inc
pgcommitfest/commitfest/views.py
pgcommitfest/urls.py

index e33e662607767235690debf4ac2316ee798bc7a1..5756e04aaee2789a19206cacb3a9ad9d5641afc5 100644 (file)
@@ -35,7 +35,7 @@
     "pk": 5,
     "model": "commitfest.patchstatus",
     "fields": {
-      "statusstring": "Returned with Feedback",
+      "statusstring": "Moved to next CF",
       "sortkey": 30
     }
   },
       "statusstring": "Rejected",
       "sortkey": 50
     }
+  },
+  {
+    "pk": 7,
+    "model": "commitfest.patchstatus",
+    "fields": {
+      "statusstring": "Returned with Feedback",
+      "sortkey": 50
+    }
   }
-]
\ No newline at end of file
+]
index 60350277c718d60c30db2128fb8428d5a37ca332..23fe1fb1dcb43adea84192d57613556188943fe1 100644 (file)
@@ -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]
index ce0df910bc7a804485475deb12d52f994449dc7b..08701e130a53609dbc49ba96c4667438aaff9e21 100644 (file)
@@ -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');
index 71959ffabd98a45a5c0d8378cf51d90d97aac307..bb38e62b803aa6b5074b25eeb405d80fb1b7dcdd 100644 (file)
@@ -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>
index 1b2345491ddc3b7230cbdb27132df3f4d10273ac..ddc579aa7540014abe53a9ff250d12eadd00afb1 100644 (file)
@@ -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:
index 46e03327ea168603f0e48ab7d1ec3891a96a382a..4c2eb4ecc3706c390c50432c1f467d1e71718c51 100644 (file)
@@ -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'),