From 23835bb85b1ff6491e87333f73a41036acf4097b Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 30 Apr 2006 17:00:49 +0000 Subject: [PATCH] r795: If we get a validation bug for certain fields, set them to default instead of erroring --- includes/api_bug.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/includes/api_bug.php b/includes/api_bug.php index be0e6a1..bed8890 100644 --- a/includes/api_bug.php +++ b/includes/api_bug.php @@ -24,6 +24,9 @@ $GLOBALS['isso:callback']->load('api', null); /** * API: Bug * +* Note: When priority, esverity, status, and resolution should throw a +* verification error, they actually set it to the default value +* * @author Iris Studios, Inc. * @copyright Copyright ©2002 - [#]year[#], Iris Studios, Inc. * @version $Revision$ @@ -153,7 +156,7 @@ class BugAPI extends API { if (!$this->registry->datastore['priority'][ $this->values['priority'] ]) { - return false; + $this->set('priority', $this->registry->options['defaultpriority']); } return true; } @@ -168,7 +171,7 @@ class BugAPI extends API { if (!$this->registry->datastore['severity'][ $this->values['severity'] ]) { - return false; + $this->set('priority', $this->registry->options['defaultseverity']); } return true; } @@ -183,7 +186,7 @@ class BugAPI extends API { if (!$this->registry->datastore['status'][ $this->values['status'] ]) { - return false; + $this->set('priority', $this->registry->options['defaultstatus']); } return true; } @@ -198,7 +201,7 @@ class BugAPI extends API { if (!$this->registry->datastore['resolution'][ $this->values['resolution'] ]) { - return false; + $this->set('priority', $this->registry->options['defaultresolve']); } return true; } @@ -213,7 +216,7 @@ class BugAPI extends API { if (!$this->registry->datastore['assignedto'][ $this->values['assignedto'] ]['userid']) { - return false; + $this->set('priority', $this->registry->options['defaultassign']); } return true; } -- 2.22.5