From b30a4fca240cee1f689715b0e1636d23f92bc2fd Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Mon, 1 Aug 2016 12:00:32 +0100 Subject: Allow priority changes when start and end differ It's common to want an 'inverted' priority range, for example where P0 is the highest. The task helper logic would hide priority editing when priority_end was larger than priority_start. This logic change allows it by checking that priority_start and priority_end are different. --- app/Helper/TaskHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Helper/TaskHelper.php') diff --git a/app/Helper/TaskHelper.php b/app/Helper/TaskHelper.php index 481a5efb..84730010 100644 --- a/app/Helper/TaskHelper.php +++ b/app/Helper/TaskHelper.php @@ -148,7 +148,7 @@ class TaskHelper extends Base { $html = ''; - if ($project['priority_end'] > $project['priority_start']) { + if ($project['priority_end'] != $project['priority_start']) { $range = range($project['priority_start'], $project['priority_end']); $options = array_combine($range, $range); $values += array('priority' => $project['priority_default']); -- cgit v1.2.3 From 861441ed31a080a41dd2bfb418c03fc318d3f16e Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Mon, 1 Aug 2016 15:49:43 +0100 Subject: Display priority changes in board view for inverted priority ranges Similar to allowing update of priorities when `priority_end` is greater than `priority_start`, to support inverted priority ranges, allow that change to propagate into `formatPriority` and display in the board view. --- app/Helper/TaskHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Helper/TaskHelper.php') diff --git a/app/Helper/TaskHelper.php b/app/Helper/TaskHelper.php index 84730010..7722f4cc 100644 --- a/app/Helper/TaskHelper.php +++ b/app/Helper/TaskHelper.php @@ -228,7 +228,7 @@ class TaskHelper extends Base { $html = ''; - if ($project['priority_end'] > $project['priority_start']) { + if ($project['priority_end'] != $project['priority_start']) { $html .= ''; $html .= $task['priority'] >= 0 ? 'P'.$task['priority'] : '-P'.abs($task['priority']); $html .= ''; -- cgit v1.2.3