MantisBT - v4.0 Release (Planning)
View Issue Details
0000564v4.0 Release (Planning)Cosmetic/UI Issuespublic2010-08-29 01:232016-12-29 10:16
Reporteropto 
Assigned Tocaseydk 
PrioritynormalSeverityminorReproducibilityalways
StatusacknowledgedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version4.0Fixed in Version4.0 
Summary0000564: lowest/highest priority hardcoded
Descriptionmodules\tasks\todo.php contains
        if ($task_priority > -2 && $task_priority < 2) {
                    // set priority


I think the system configuration can change the number of priorities in use.
So -2 and 2 should be taken from there
TagsNo tags attached.
Attached Files

Notes
(0001242)
opto   
2010-08-29 01:46   
(Last edited: 2010-08-29 01:50)
in system config, it is the field TaskPriority

further down in same file, priority names are hardcoded:
$priorities = array('1' => 'high', '0' => 'normal', '-1' => 'low');

replace by
              $priorities = w2PgetSysval('TaskPriority');

(0001244)
opto   
2010-08-29 12:26   
other place: hardcoded:
        if ($task_priority == 'c') {
            // mark task as completed
            $q = new DBQuery;
            $q->addTable('tasks');
            $q->addUpdate('task_percent_complete', '100');
            $q->addWhere('task_id=' . (int)$val);
        } else
            if ($task_priority == 'd') {
                // delete task
                $q = new DBQuery;
                $q->setDelete('tasks');
                $q->addWhere('task_id=' . (int)$val);
            } else
                if ($task_priority > -2 && $task_priority < 2) {
    


the last line should not be hardcoded (-2, 2)



$task_priority is a POST. So can it be other than what we offer in the select box? So is the 'if' necessary? Or just test on numeric?
For testing, I will comment it away so that higher priorities will be saved as well
(0003510)
caseydk   
2014-06-21 22:46   
Resolved in v4.0 development:
https://github.com/web2project/web2project/commit/eb659437c61ec44df60ce639e3f3503c11539a85
(0003849)
caseydk   
2016-12-29 10:16   

I'm changing this issue to acknowledged.

While it's resolved in the v4.0 development branch. That is going to be reviewed commit by commit and merged into a new development branch over the next couple months.

Issue History
2010-08-29 01:23optoNew Issue
2010-08-29 01:46optoNote Added: 0001242
2010-08-29 01:50optoNote Edited: 0001242
2010-08-29 12:26optoNote Added: 0001244
2010-08-30 22:15caseydkProjectv2.0 Release (Closed) => Pending Requests
2014-06-10 22:24caseydkProjectPending Requests => v4.0 Release (Planning)
2014-06-10 22:49caseydkTarget Version => 4.0
2014-06-21 22:46caseydkNote Added: 0003510
2014-06-21 22:46caseydkStatusnew => resolved
2014-06-21 22:46caseydkFixed in Version => 4.0
2014-06-21 22:46caseydkResolutionopen => fixed
2014-06-21 22:46caseydkAssigned To => caseydk
2014-07-13 20:33caseydkCategoryGeneral => Cosmetic/UI Issues
2016-12-29 10:16caseydkStatusresolved => acknowledged
2016-12-29 10:16caseydkNote Added: 0003849