Пример #1
0
    foreach ($categories as $category) {
        $category = trim($category);
        if ($category != "") {
            $categories2[] = $category;
        }
    }
    $categories = implode("\n", $categories2);
    $database_config_bible->setSprintTaskCompletionCategories($bible, $categories);
}
$tasks = $database_sprint->getTasks($bible, $year, $month);
$titles = array();
$percentages = array();
foreach ($tasks as &$id) {
    $titles[] = Filter_Html::sanitize($database_sprint->getTitle($id));
    $percentages[] = $database_sprint->getComplete($id);
}
$view->view->bible = $bible;
$view->view->sprint = date("F Y", mktime(0, 0, 0, $month, 1, $year));
$view->view->tasks = $tasks;
$view->view->titles = $titles;
$view->view->percentages = $percentages;
//if (extension_loaded ("gd")) {
//  $view->view->chart = base64_encode (Sprint_Logic::createGraphicalBurndownChart ($bible, $year, $month));
//}
$view->view->chart2 = Sprint_Logic::createTextBasedBurndownChart($bible, $year, $month);
$categorytext = $database_config_bible->getSprintTaskCompletionCategories($bible);
$view->view->categorytext = $categorytext;
$categories = explode("\n", $categorytext);
$view->view->categories = $categories;
$view->render("index.php");
Assets_Page::footer();
Пример #2
0
                    $body = array();
                    $body[] = "<h3>" . Locale_Translate::_("Sprint Planning and Team's Progress") . " | {$bible}</h3>";
                    $body[] = "<table>";
                    $tasks = $database_sprint->getTasks($bible, $year, $month);
                    foreach ($tasks as $id) {
                        $body[] = "<tr>";
                        $title = $database_sprint->getTitle($id);
                        $body[] = "<td>" . $title . "</td>";
                        $complete = $database_sprint->getComplete($id);
                        $text = str_repeat("▓", intval($complete / $category_percentage)) . str_repeat("▁", $category_count - intval($complete / $category_percentage));
                        $body[] = "<td>" . $text . "</td>";
                        $body[] = "</tr>";
                    }
                    $body[] = "</table>";
                    $body[] = "<h3>" . Locale_Translate::_("Sprint Burndown Chart - Remaining Tasks") . "</h3>";
                    $burndownchart = Sprint_Logic::createTextBasedBurndownChart($bible, $year, $month);
                    $body[] = "<p>{$burndownchart}</p>";
                    if (count($body) > 0) {
                        $body = implode("\n", $body);
                        if (!Filter_Client::enabled()) {
                            $database_mail->send($user, $subject, $body);
                        }
                    }
                }
            }
        } else {
            // Since there are no tasks, no mail will be sent: Make a logbook entry.
            $database_logs->log("No tasks in this Sprint: No email was sent");
        }
    }
}