--- /dev/null
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('commitfest', '0002_notifications'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='patchoncommitfest',
+ name='status',
+ field=models.IntegerField(default=1, choices=[(1, b'Needs review'), (2, b'Waiting on Author'), (3, b'Ready for Committer'), (4, b'Committed'), (5, b'Moved to next CF'), (6, b'Rejected'), (7, b'Returned with feedback'), (8, b'Withdrawn')]),
+ ),
+ migrations.RunSQL("""
+INSERT INTO commitfest_patchstatus (status, statusstring, sortkey) VALUES
+(1,'Needs review',10),
+(2,'Waiting on Author',15),
+(3,'Ready for Committer',20),
+(4,'Committed',25),
+(5,'Moved to next CF',30),
+(6,'Rejected',50),
+(7,'Returned with Feedback',50),
+(8,'Withdrawn', 50)
+ON CONFLICT (status) DO UPDATE SET statusstring=excluded.statusstring, sortkey=excluded.sortkey;
+"""),
+ migrations.RunSQL("DELETE FROM commitfest_patchstatus WHERE status < 1 OR status > 8"),
+ ]
STATUS_NEXT=5
STATUS_REJECTED=6
STATUS_RETURNED=7
+ STATUS_WITHDRAWN=8
_STATUS_CHOICES=(
(STATUS_REVIEW, 'Needs review'),
(STATUS_AUTHOR, 'Waiting on Author'),
(STATUS_COMMITTED, 'Committed'),
(STATUS_NEXT, 'Moved to next CF'),
(STATUS_REJECTED, 'Rejected'),
- (STATUS_RETURNED, 'Returned with feedback')
+ (STATUS_RETURNED, 'Returned with feedback'),
+ (STATUS_WITHDRAWN, 'Withdrawn'),
)
_STATUS_LABELS=(
(STATUS_REVIEW, 'default'),
(STATUS_NEXT, 'warning'),
(STATUS_REJECTED, 'danger'),
(STATUS_RETURNED, 'danger'),
+ (STATUS_WITHDRAWN, 'danger'),
)
OPEN_STATUSES=[STATUS_REVIEW, STATUS_AUTHOR, STATUS_COMMITTER]
OPEN_STATUS_CHOICES=[x for x in _STATUS_CHOICES if x[0] in OPEN_STATUSES]
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" or "Moved to next CF".\n\nSo - are you sure?');
}
+function verify_withdrawn() {
+ return confirm('Are you sure you want to close this patch as Withdrawn?\n\nThis should only be done when the author voluntarily withdraws the patch.\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 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?');
}
<li role="presentation" class="divider"></li>
<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/withdrawn/" onclick="return verify_withdrawn()">Withdrawn</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>
# need to check if the individual status has changed.
if status == 'reject':
poc.status = PatchOnCommitFest.STATUS_REJECTED
+ elif status == 'withdrawn':
+ poc.status = PatchOnCommitFest.STATUS_WITHDRAWN
elif status == 'feedback':
poc.status = PatchOnCommitFest.STATUS_RETURNED
elif status == 'next':
url(r'^(\d+)/(\d+)/edit/$', views.patchform),
url(r'^(\d+)/new/$', views.newpatch),
url(r'^(\d+)/(\d+)/status/(review|author|committer)/$', views.status),
- url(r'^(\d+)/(\d+)/close/(reject|feedback|committed|next)/$', views.close),
+ url(r'^(\d+)/(\d+)/close/(reject|withdrawn|feedback|committed|next)/$', views.close),
url(r'^(\d+)/(\d+)/reviewer/(become|remove)/$', views.reviewer),
url(r'^(\d+)/(\d+)/committer/(become|remove)/$', views.committer),
url(r'^(\d+)/(\d+)/(un)?subscribe/$', views.subscribe),