JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
clients can put tasks on hold
authorJason Woofenden <jason283@herkamire.com>
Tue, 26 May 2009 17:48:08 +0000 (13:48 -0400)
committerJason Woofenden <jason283@herkamire.com>
Tue, 26 May 2009 17:48:08 +0000 (13:48 -0400)
no special code for re-enabling them. Clients can click 'request price'
but currently there's no code to remember if the price was accepted or not

code/tasks.php
tasks.html
tasks.php

index b985661..a716fa2 100644 (file)
@@ -4,6 +4,7 @@ define('TASK_DRAFT', 0);
 define('TASK_NEEDS_CLARIFICATION', 100);
 define('TASK_NEEDS_QUOTE', 200);
 define('TASK_NEEDS_GO_AHEAD', 300);
+define('TASK_ON_HOLD', 350);
 define('TASK_QUEUED', 400);
 define('TASK_WORKING', 500);
 define('TASK_BUG', 600);
index da0188e..08e7a47 100644 (file)
@@ -33,6 +33,8 @@
 
   <!--~working_link start~--><p><a href="tasks?tasks_working_id=~task_id.attr~">I'm starting on this now</a>.</p><!--~end~-->
 
+  <!--~hold_link start~--><p><a href="tasks?tasks_hold_id=~task_id.attr~">Place this task on hold</a>.</p><!--~end~-->
+
   <!--~needs_testing_link start~--><p><a href="tasks?tasks_needs_testing_id=~task_id.attr~">Mark this task as finished (request testing)</a>.</p><!--~end~-->
 
   <!--~finished_link start~--><p>Please test everything in the narrative! If everything is working, <a href="tasks?tasks_finished_id=~task_id.attr~">Mark this task as finished</a> Otherwise please e-mail or call Jason.</p><!--~end~-->
index 6d382bc..7116567 100644 (file)
--- a/tasks.php
+++ b/tasks.php
@@ -328,6 +328,13 @@ function tasks_edit_main() {
                $state = TASK_BUG;
        }
 
+       if(isset($_REQUEST['tasks_hold_id'])) {
+               $id = $_REQUEST['tasks_hold_id'];
+               db_update('tasks', 'state', TASK_ON_HOLD, 'where id=%i', $id);
+               message("Task removed from Jason's to-do list.");
+               return './';
+       }
+
        if(isset($_REQUEST['tasks_mark_paid_id'])) {
                if(!logged_in_as_contractor()) {
                        message("Error: only Jason can mark tasks as paid.");