403Webshell
Server IP : 185.252.147.100  /  Your IP : 216.73.216.43
Web Server : nginx/1.27.3
System : Linux mitrofanov.ru 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64
User : mitr ( 1000)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /www/html/kanboard/app/Analytic/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/html/kanboard/app/Analytic/EstimatedActualColumnAnalytic.php
<?php

namespace Kanboard\Analytic;

use Kanboard\Core\Base;
use Kanboard\Model\TaskModel;

/**
 * Estimated vs actual time per column
 *
 * @package  analytic
 * @author   Frederic Guillot
 */
class EstimatedActualColumnAnalytic extends Base
{
    /**
     * Build report
     *
     * @access public
     * @param  integer   $project_id    Project id
     * @return array
     */
    public function build($project_id)
    {
        $rows = $this->db->table(TaskModel::TABLE)
            ->columns('SUM(time_estimated) AS hours_estimated', 'SUM(time_spent) AS hours_spent', 'column_id')
            ->eq('project_id', $project_id)
            ->groupBy('column_id')
            ->findAll();

        $columns = $this->columnModel->getList($project_id);

        $metrics = [];
        foreach ($columns as $column_id => $column_title) {
            $metrics[$column_id] = array(
                'hours_spent' => 0,
                'hours_estimated' => 0,
                'title' => $column_title,
            );
        }

        foreach ($rows as $row) {
            $metrics[$row['column_id']]['hours_spent'] = (float) $row['hours_spent'];
            $metrics[$row['column_id']]['hours_estimated'] = (float) $row['hours_estimated'];
        }

        return $metrics;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit