[Rt-commit] rt branch, 4.4/custom-field-msg, repushed

Dustin Graves dustin at bestpractical.com
Mon Aug 17 11:25:59 EDT 2015


The branch 4.4/custom-field-msg was deleted and repushed:
       was 9d0d0609d79a029d99d14e71f9ef6abdfb8399fc
       now 7058527a74579e3d5c69081e3be77ee5446c84f2

1:  9d0d060 ! 1:  7058527 Improve applying a custom field to a queue message
    @@ -18,15 +18,13 @@
              CustomField => $self->id, ObjectId => $id,
          );
     +
    -+    my $object_name;
    ++    my $msg;
     +    # If object has no id, it represents all objects
     +    if ($object->id) {
    -+        $object_name = $object->Name;
    ++        $msg = $self->loc( 'Added custom field [_1] to [_2].', $self->Name, $object->Name );
     +    } else {
    -+        $object_name = 'All Objects';
    ++        $msg = $self->loc( 'Globall added custom field [_1].', $self->Name );
     +    }
    -+
    -+    my $msg = $self->loc( 'Added custom field [_1] to [_2].', $self->Name, $object_name );
     +
          return ( $oid, $msg );
      }
    @@ -38,15 +36,13 @@
     -    my ( $oid, $msg ) = $ocf->Delete;
     +    my $oid = $ocf->Delete;
     +
    -+    my $object_name;
    ++    my $msg;
     +    # If object has no id, it represents all objects
     +    if ($object->id) {
    -+        $object_name = $object->Name;
    ++        $msg = $self->loc( 'Removed custom field [_1] from [_2].', $self->Name, $object->Name );
     +    } else {
    -+        $object_name = 'All Objects';
    ++        $msg = $self->loc( 'Globally removed custom field [_1].', $self->Name );
     +    }
    -+
    -+    my $msg = "Removed custom field " . $self->Name . " from " . $object_name . ".";
     +
          return ( $oid, $msg );
      }
    @@ -126,13 +122,13 @@
     +    is($msg, 'Added custom field custom_field_0 to queue_name_0.', "Adding custom field to queue produces appropriate message");
     +
     +    ($status, $msg) = $custom_field->RemoveFromObject( $queue );
    -+    is($msg, 'Removed custom field custom_field_0 from queue_name_0.', "Remove custom field from queue produces appropriate message");
    ++    is($msg, 'Removed custom field custom_field_0 from queue_name_0.', "Removing custom field from queue produces appropriate message");
     +
     +    ($status, $msg) = $custom_field->AddToObject( $all_queues );
    -+    is($msg, 'Added custom field custom_field_0 to All Objects.', "Adding custom field to General queue produces appropriate message");
    ++    is($msg, 'Globally added custom field custom_field_0.', "Adding custom field globally produces appropriate message");
     +
     +    ($status, $msg) = $custom_field->RemoveFromObject( $all_queues );
    -+    is($msg, 'Removed custom field custom_field_0 from All Objects.', "Remove custom field from General queue produces appropriate message");
    ++    is($msg, 'Globally removed custom field custom_field_0.', "Rmeoving custom field globally produces appropriate message");
     +}
     +
     +# Ticket CustomField Message Test
    @@ -147,13 +143,13 @@
     +    is($msg, 'Added custom field custom_field_1 to queue_name_1.', "Adding custom field to queue-ticket produces appropriate message");
     +
     +    ($status, $msg) = $custom_field->RemoveFromObject( $queue );
    -+    is($msg, 'Removed custom field custom_field_1 from queue_name_1.', "Remove custom field from queue produces appropriate message");
    ++    is($msg, 'Removed custom field custom_field_1 from queue_name_1.', "Removing custom field from queue produces appropriate message");
     +
     +    ($status, $msg) = $custom_field->AddToObject( $all_queues );
    -+    is($msg, 'Added custom field custom_field_1 to All Objects.', "Adding custom field to General queue produces appropriate message");
    ++    is($msg, 'Globally added custom field custom_field_1.', "Adding custom field globally produces appropriate message");
     +
     +    ($status, $msg) = $custom_field->RemoveFromObject( $all_queues );
    -+    is($msg, 'Removed custom field custom_field_1 from All Objects.', "Remove custom field from General queue produces appropriate message");
    ++    is($msg, 'Globally removed custom field custom_field_1.', "Removing custom field globally produces appropriate message");
     +}
     +
     +# Class CustomField Message Test
    @@ -171,10 +167,10 @@
     +    is($msg, 'Removed custom field custom_field_2 from class_name_0.', "Remove custom field from class produces appropriate message");
     +
     +    ($status, $msg) = $custom_field->AddToObject( $all_classes );
    -+    is($msg, 'Added custom field custom_field_2 to All Objects.', "Adding custom field to General class produces appropriate message");
    ++    is($msg, 'Globally added custom field custom_field_2.', "Adding custom field globally produces appropriate message");
     +
     +    ($status, $msg) = $custom_field->RemoveFromObject( $all_classes );
    -+    is($msg, 'Removed custom field custom_field_2 from All Objects.', "Remove custom field from General class produces appropriate message");
    ++    is($msg, 'Globally removed custom field custom_field_2.', "Removing custom field globally produces appropriate message");
     +}
      
     



More information about the rt-commit mailing list