[Rt-commit] rt branch, 4.4/custom-field-disable-enable-msg, repushed
Dustin Graves
dustin at bestpractical.com
Fri Aug 14 13:15:57 EDT 2015
The branch 4.4/custom-field-disable-enable-msg was deleted and repushed:
was b07841adca7124f3fe00317a80ba300cf8877be3
now 64eb8edab9bc80f553f5984e7a328ba0cad81844
1: b07841a ! 1: 64eb8ed Change Custom Field disable/enable message to be friendlier
@@ -22,7 +22,7 @@
+
+ $RT::Handle->BeginTransaction();
+
-+ my ($status, $msg) = $self->SUPER::SetDisabled($val);
++ my ($status, $msg) = $self->_Set(Field => 'Disabled', Value => $val);
+
+ unless ($status) {
+ $RT::Handle->Rollback();
@@ -40,3 +40,22 @@
=head2 SetTypeComposite
+
+diff --git a/t/api/customfield.t b/t/api/customfield.t
+--- a/t/api/customfield.t
++++ b/t/api/customfield.t
+@@
+
+ # Disable one of them
+ ($ok, $msg) = $cf->SetDisabled(1);
++is($msg, "Disabled", "Disabling custom field gives correct message");
+ ok($ok, "Disabled the Queue-specific one");
++($ok, $msg) = $cf->SetDisabled(0);
++is($msg, "Enabled", "Enabling custom field gives correct message");
++ok($ok, "Enabled the Queue-specific one");
++($ok, $msg) = $cf->SetDisabled(1);
++is($msg, "Disabled", "Disabling custom field again gives correct message");
++ok($ok, "Disabled the Queue-specific one again");
+
+ # With just a name, prefers the non-disabled
+ $cf = RT::CustomField->new( RT->SystemUser );
More information about the rt-commit
mailing list