Subtask issue when writing a task organizer script

Asked By 20 points N/A Posted on -

Hey techyv,

I am currently writing a task organizer script and am having difficulties with marking the subtasks as complete or not complete. My code is:

if($_POST['finished']){ // $_POST['finished'] is an html array of check boxes
 $subtask = Subtask::find_all_by_task_id($task->id);
 foreach($subtask as $stask){
 foreach($_POST['finished'] as $fin){ 
 if($stask->id == $fin){
 $stask->finished_at = date('Y-m-d H:i:s', time());
 } elseif($stask->id != $fin){
 $stask->finished_at = "";

Answered By 0 points N/A #173992

Subtask issue when writing a task organizer script


The software version should be v1.6 so as to be compliant with JSR-223, e.g Groovy, Python e.t.c and for version 2.1 writing your own JQL functions are supported and and the plugin has useful functions such as subtasksOf(…). With this versions you can Auto transition parent when all sub tasks are resolved, Automatically add watchers, rename a user and many more.

Login/Register to Answer

Related Questions