Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 535af6e

Browse filesBrowse files
committed
Add "withdrawn" commitfest status
By popular (?) request
1 parent 41ce86f commit 535af6e
Copy full SHA for 535af6e

File tree

6 files changed

+43
-2
lines changed
Filter options

6 files changed

+43
-2
lines changed
+32Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
3+
4+
from django.db import migrations, models
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('commitfest', '0002_notifications'),
11+
]
12+
13+
operations = [
14+
migrations.AlterField(
15+
model_name='patchoncommitfest',
16+
name='status',
17+
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')]),
18+
),
19+
migrations.RunSQL("""
20+
INSERT INTO commitfest_patchstatus (status, statusstring, sortkey) VALUES
21+
(1,'Needs review',10),
22+
(2,'Waiting on Author',15),
23+
(3,'Ready for Committer',20),
24+
(4,'Committed',25),
25+
(5,'Moved to next CF',30),
26+
(6,'Rejected',50),
27+
(7,'Returned with Feedback',50),
28+
(8,'Withdrawn', 50)
29+
ON CONFLICT (status) DO UPDATE SET statusstring=excluded.statusstring, sortkey=excluded.sortkey;
30+
"""),
31+
migrations.RunSQL("DELETE FROM commitfest_patchstatus WHERE status < 1 OR status > 8"),
32+
]

‎pgcommitfest/commitfest/models.py

Copy file name to clipboardExpand all lines: pgcommitfest/commitfest/models.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,16 @@ class PatchOnCommitFest(models.Model):
159159
STATUS_NEXT=5
160160
STATUS_REJECTED=6
161161
STATUS_RETURNED=7
162+
STATUS_WITHDRAWN=8
162163
_STATUS_CHOICES=(
163164
(STATUS_REVIEW, 'Needs review'),
164165
(STATUS_AUTHOR, 'Waiting on Author'),
165166
(STATUS_COMMITTER, 'Ready for Committer'),
166167
(STATUS_COMMITTED, 'Committed'),
167168
(STATUS_NEXT, 'Moved to next CF'),
168169
(STATUS_REJECTED, 'Rejected'),
169-
(STATUS_RETURNED, 'Returned with feedback')
170+
(STATUS_RETURNED, 'Returned with feedback'),
171+
(STATUS_WITHDRAWN, 'Withdrawn'),
170172
)
171173
_STATUS_LABELS=(
172174
(STATUS_REVIEW, 'default'),
@@ -176,6 +178,7 @@ class PatchOnCommitFest(models.Model):
176178
(STATUS_NEXT, 'warning'),
177179
(STATUS_REJECTED, 'danger'),
178180
(STATUS_RETURNED, 'danger'),
181+
(STATUS_WITHDRAWN, 'danger'),
179182
)
180183
OPEN_STATUSES=[STATUS_REVIEW, STATUS_AUTHOR, STATUS_COMMITTER]
181184
OPEN_STATUS_CHOICES=[x for x in _STATUS_CHOICES if x[0] in OPEN_STATUSES]

‎pgcommitfest/commitfest/static/commitfest/js/commitfest.js

Copy file name to clipboardExpand all lines: pgcommitfest/commitfest/static/commitfest/js/commitfest.js
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
function verify_reject() {
22
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?');
33
}
4+
function verify_withdrawn() {
5+
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?');
6+
}
47
function verify_returned() {
58
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?');
69
}

‎pgcommitfest/commitfest/templates/patch_commands.inc

Copy file name to clipboardExpand all lines: pgcommitfest/commitfest/templates/patch_commands.inc
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<li role="presentation" class="divider"></li>
2020
<li role="presentation" class="dropdown-header">Closed statuses</li>
2121
<li role="presentation"><a href="close/reject/" onclick="return verify_reject()">Rejected</a></li>
22+
<li role="presentation"><a href="close/withdrawn/" onclick="return verify_withdrawn()">Withdrawn</a></li>
2223
<li role="presentation"><a href="close/feedback/" onclick="return verify_returned()">Returned with feedback</a></li>
2324
<li role="presentation"><a href="close/next/" onclick="return verify_next()">Move to next CF</a></li>
2425
<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>

‎pgcommitfest/commitfest/views.py

Copy file name to clipboardExpand all lines: pgcommitfest/commitfest/views.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,8 @@ def close(request, cfid, patchid, status):
520520
# need to check if the individual status has changed.
521521
if status == 'reject':
522522
poc.status = PatchOnCommitFest.STATUS_REJECTED
523+
elif status == 'withdrawn':
524+
poc.status = PatchOnCommitFest.STATUS_WITHDRAWN
523525
elif status == 'feedback':
524526
poc.status = PatchOnCommitFest.STATUS_RETURNED
525527
elif status == 'next':

‎pgcommitfest/urls.py

Copy file name to clipboardExpand all lines: pgcommitfest/urls.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
url(r'^(\d+)/(\d+)/edit/$', views.patchform),
2222
url(r'^(\d+)/new/$', views.newpatch),
2323
url(r'^(\d+)/(\d+)/status/(review|author|committer)/$', views.status),
24-
url(r'^(\d+)/(\d+)/close/(reject|feedback|committed|next)/$', views.close),
24+
url(r'^(\d+)/(\d+)/close/(reject|withdrawn|feedback|committed|next)/$', views.close),
2525
url(r'^(\d+)/(\d+)/reviewer/(become|remove)/$', views.reviewer),
2626
url(r'^(\d+)/(\d+)/committer/(become|remove)/$', views.committer),
2727
url(r'^(\d+)/(\d+)/(un)?subscribe/$', views.subscribe),

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.