Anonymous Login
2023-03-20 06:34 PDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000564v4.0 Release (Planning)Cosmetic/UI Issuespublic2016-12-29 10:16
Reporteropto 
Assigned Tocaseydk 
PrioritynormalSeverityminorReproducibilityalways
StatusacknowledgedResolutionfixed 
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

-Relationships
+Relationships

-Notes

~0001242

opto (manager)

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 (manager)

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 (administrator)

Resolved in v4.0 development:
https://github.com/web2project/web2project/commit/eb659437c61ec44df60ce639e3f3503c11539a85

~0003849

caseydk (administrator)


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.
+Notes

-Issue History
Date Modified Username Field Change
2010-08-29 01:23 opto New Issue
2010-08-29 01:46 opto Note Added: 0001242
2010-08-29 01:50 opto Note Edited: 0001242
2010-08-29 12:26 opto Note Added: 0001244
2010-08-30 22:15 caseydk Project v2.0 Release (Closed) => Pending Requests
2014-06-10 22:24 caseydk Project Pending Requests => v4.0 Release (Planning)
2014-06-10 22:49 caseydk Target Version => 4.0
2014-06-21 22:46 caseydk Note Added: 0003510
2014-06-21 22:46 caseydk Status new => resolved
2014-06-21 22:46 caseydk Fixed in Version => 4.0
2014-06-21 22:46 caseydk Resolution open => fixed
2014-06-21 22:46 caseydk Assigned To => caseydk
2014-07-13 20:33 caseydk Category General => Cosmetic/UI Issues
2016-12-29 10:16 caseydk Status resolved => acknowledged
2016-12-29 10:16 caseydk Note Added: 0003849
+Issue History