From 4b5a78e3435bee7982a610c0847a09f7e0c445a6 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 26 Jan 2018 09:39:00 -0800 Subject: [PATCH] Add "you can only enter one value" UI limits to Herald "set status" and "set priority" actions Summary: Ref T13048. Fixes T11112. I mostly fixed this before in D18887, but missed that these other actions are also affected. T11112 had a more complete list of missing limits. (It's possible there are some others somewhere, but this is everything we know about, I think.) Test Plan: Created rules using these actions, typed stuff into the box, was only able to enter one value. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13048, T11112 Differential Revision: https://secure.phabricator.com/D18943 --- .../maniphest/herald/ManiphestTaskPriorityHeraldAction.php | 3 ++- .../maniphest/herald/ManiphestTaskStatusHeraldAction.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/applications/maniphest/herald/ManiphestTaskPriorityHeraldAction.php b/src/applications/maniphest/herald/ManiphestTaskPriorityHeraldAction.php index 2e2db4b62d..8fe5e07122 100644 --- a/src/applications/maniphest/herald/ManiphestTaskPriorityHeraldAction.php +++ b/src/applications/maniphest/herald/ManiphestTaskPriorityHeraldAction.php @@ -61,7 +61,8 @@ final class ManiphestTaskPriorityHeraldAction } protected function getDatasource() { - return new ManiphestTaskPriorityDatasource(); + return id(new ManiphestTaskPriorityDatasource()) + ->setLimit(1); } protected function getDatasourceValueMap() { diff --git a/src/applications/maniphest/herald/ManiphestTaskStatusHeraldAction.php b/src/applications/maniphest/herald/ManiphestTaskStatusHeraldAction.php index c1ff3bcdc7..de84b3c245 100644 --- a/src/applications/maniphest/herald/ManiphestTaskStatusHeraldAction.php +++ b/src/applications/maniphest/herald/ManiphestTaskStatusHeraldAction.php @@ -58,7 +58,8 @@ final class ManiphestTaskStatusHeraldAction } protected function getDatasource() { - return new ManiphestTaskStatusDatasource(); + return id(new ManiphestTaskStatusDatasource()) + ->setLimit(1); } protected function getDatasourceValueMap() {