Skip to content

Commit 03decea

Browse files
Update task status (#1126)
* update task status workflow update task status Update the status add done status * change usassgined to available * fix tests
1 parent 5cd5815 commit 03decea

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

constants/tasks.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,11 @@ const TASK_TYPE = {
55
};
66

77
const TASK_STATUS = {
8-
// old task workflow
9-
ACTIVE: "IN_PROGRESS",
10-
"HIGH PRIORITY": "HIGH PRIORITY",
11-
PENDING: "IN_PROGRESS",
8+
AVAILABLE: "AVAILABLE",
129
ASSIGNED: "ASSIGNED",
13-
BLOCKED: "BLOCKED",
1410
COMPLETED: "COMPLETED",
15-
16-
// new task workflow
1711
IN_PROGRESS: "IN_PROGRESS",
18-
UNASSIGNED: "AVAILABLE",
19-
AVAILABLE: "AVAILABLE",
12+
BLOCKED: "BLOCKED",
2013
SMOKE_TESTING: "SMOKE_TESTING",
2114
NEEDS_REVIEW: "NEEDS_REVIEW",
2215
IN_REVIEW: "IN_REVIEW",
@@ -26,8 +19,10 @@ const TASK_STATUS = {
2619
REGRESSION_CHECK: "REGRESSION_CHECK",
2720
RELEASED: "RELEASED",
2821
VERIFIED: "VERIFIED",
22+
DONE: "DONE",
2923
};
3024

25+
// TODO: convert this to new task status
3126
const TASK_STATUS_OLD = {
3227
OLD_ACTIVE: "active",
3328
OLD_BLOCKED: "blocked",

test/integration/tasks.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe("Tasks", function () {
3737
type: "feature",
3838
endsOn: 1234,
3939
startedOn: 4567,
40-
status: "active",
40+
status: "IN_PROGRESS",
4141
percentCompleted: 10,
4242
participants: [],
4343
assignee: appOwner.username,
@@ -402,7 +402,7 @@ describe("Tasks", function () {
402402
it("Should return 200 when username is valid", function (done) {
403403
chai
404404
.request(app)
405-
.get(`/tasks/${appOwner.username}?status=active`)
405+
.get(`/tasks/${appOwner.username}?status=IN_PROGRESS`) // TODO: if status is passed in lowercase it fails, fix this
406406
.end((err, res) => {
407407
if (err) {
408408
return done(err);
@@ -427,7 +427,7 @@ describe("Tasks", function () {
427427
it("Should return 404 when username is invalid", function (done) {
428428
chai
429429
.request(app)
430-
.get("/tasks/dummyUser?status=active")
430+
.get("/tasks/dummyUser?status=in_progress")
431431
.end((err, res) => {
432432
if (err) {
433433
return done(err);

0 commit comments

Comments
 (0)