r1085: If you delete a resolution, severity, priority, or status, make sure that...
authorRobert Sesek <rsesek@bluestatic.org>
Fri, 18 Aug 2006 22:44:03 +0000 (22:44 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Fri, 18 Aug 2006 22:44:03 +0000 (22:44 +0000)
docs/changes.txt
includes/api_priority.php
includes/api_resolution.php
includes/api_severity.php
includes/api_status.php

index 6f475db4d9f947238138a66c0db27212419ddac6..81408deb7c7f4666e810539a64d35853ee411cbf 100644 (file)
@@ -10,6 +10,7 @@
 - Fix a call to a non-object error [editcomment.php#116]
 - Switch to gettext language system instead of the XML-strings format
 - Fixing warnings related to Printer->page_confirm() throughout the entire admin section
+- After you delete a resolution, severity, priority, or status, set all bugs with the deleted field item back to the value set as default
 
 1.1.0 Beta 1
 ==================
index 8a48dbac6599b796ab03e35c99ed83350509832a..a37406a3304634ca50789ef7a071e93a94518f72 100644 (file)
@@ -90,6 +90,7 @@ class PriorityAPI extends API
        function post_delete()
        {
                build_priorities();
+               $this->registry->db->query("UPDATE " . TABLE_PREFIX . "bug SET priority = " . $this->registry->options['defaultpriority'] . " WHERE priority = " . $this->values['priorityid']);
        }
 }
 
index 46af56c5d60459b4e15f5cabf9f0d56ae5cf1219..aaae47fe61604384b10d8f4691dc211a979191f6 100644 (file)
@@ -90,6 +90,7 @@ class ResolutionAPI extends API
        function post_delete()
        {
                build_resolutions();
+               $this->registry->db->query("UPDATE " . TABLE_PREFIX . "bug SET resolution = " . $this->registry->options['defaultresolution'] . " WHERE resolution = " . $this->values['resolutionid']);
        }
 }
 
index 678ca19653434ef026b184e8cb1fc98b67238ef6..b35b967d2c7330dcf796248568182b95c2730043 100644 (file)
@@ -90,6 +90,7 @@ class SeverityAPI extends API
        function post_delete()
        {
                build_severities();
+               $this->registry->db->query("UPDATE " . TABLE_PREFIX . "bug SET severity = " . $this->registry->options['defaultseverity'] . " WHERE severity = " . $this->values['severityid']);
        }
 }
 
index 900381c1d1ef47b77c8d2d1ae4a556ed8c9d2717..1b44f6339cc51f3f30da679951f66db1ef74cba1 100644 (file)
@@ -91,6 +91,7 @@ class StatusAPI extends API
        function post_delete()
        {
                build_statuses();
+               $this->registry->db->query("UPDATE " . TABLE_PREFIX . "bug SET status = " . $this->registry->options['defaultstatus'] . " WHERE status = " . $this->values['statusid']);
        }
 }