[Rt-commit] rt branch, 4.4/custom-field-msg, repushed
Dustin Graves
dustin at bestpractical.com
Wed Aug 12 10:29:07 EDT 2015
The branch 4.4/custom-field-msg was deleted and repushed:
was 5dccb8b9cee3150056d23fa03ccd05bf08c0490a
now 9d0d0609d79a029d99d14e71f9ef6abdfb8399fc
1: 5dccb8b ! 1: 9d0d060 Improve applying a custom field to a queue message
@@ -26,7 +26,7 @@
+ $object_name = 'All Objects';
+ }
+
-+ my $msg = "Added custom field " . $self->Name . " to " . $object_name . ".";
++ my $msg = $self->loc( 'Added custom field [_1] to [_2].', $self->Name, $object_name );
+
return ( $oid, $msg );
}
@@ -52,6 +52,19 @@
}
+diff --git a/t/articles/upload-customfields.t b/t/articles/upload-customfields.t
+--- a/t/articles/upload-customfields.t
++++ b/t/articles/upload-customfields.t
+@@
+ my $tcf = (grep { /AddCustomField-/ } map { $_->name } $m->current_form->inputs )[0];
+ $m->tick( $tcf, 0 ); # Associate the new CF with this queue
+ $m->click('UpdateObjs');
+-$m->content_like( qr/Object created/, 'TCF added to the queue' );
++$m->content_contains("Added custom field img$$ to All Objects", 'TCF added to the queue' );
+
+ $m->follow_link_ok( { text => 'Articles', url_regex => qr!^/Articles/! },
+ 'UI -> Articles' );
+
diff --git a/t/customfields/api.t b/t/customfields/api.t
--- a/t/customfields/api.t
+++ b/t/customfields/api.t
@@ -164,3 +177,94 @@
+ is($msg, 'Removed custom field custom_field_2 from All Objects.', "Remove custom field from General class produces appropriate message");
+}
+
+diff --git a/t/web/cf_access.t b/t/web/cf_access.t
+--- a/t/web/cf_access.t
++++ b/t/web/cf_access.t
+@@
+ $m->tick( AddCustomField => $_ => 0 ) for @names; # ...and not any other. ;-)
+ $m->click('UpdateCFs');
+
+- $m->content_contains('Object created', 'TCF added to the queue' );
++ $m->content_contains("Added custom field img to General", 'TCF added to the queue' );
+ }
+
+ my $tester = RT::Test->load_or_create_user( Name => 'tester', Password => '123456' );
+
+diff --git a/t/web/cf_date.t b/t/web/cf_date.t
+--- a/t/web/cf_date.t
++++ b/t/web/cf_date.t
+@@
+ $m->tick( "AddCustomField" => $cfid );
+ $m->click('UpdateCFs');
+
+- $m->content_contains('Object created', 'TCF added to the queue' );
++ $m->content_contains("Added custom field $cf_name to General", 'TCF added to the queue' );
+ }
+
+ diag 'check valid inputs with various timezones in ticket create page';
+
+diff --git a/t/web/cf_datetime.t b/t/web/cf_datetime.t
+--- a/t/web/cf_datetime.t
++++ b/t/web/cf_datetime.t
+@@
+ $m->tick( "AddCustomField" => $cfid );
+ $m->click('UpdateCFs');
+
+- $m->content_contains('Object created', 'TCF added to the queue' );
++ $m->content_contains("Added custom field $cf_name to General", 'TCF added to the queue' );
+ }
+
+ diag 'check valid inputs with various timezones in ticket create page';
+
+diff --git a/t/web/cf_image.t b/t/web/cf_image.t
+--- a/t/web/cf_image.t
++++ b/t/web/cf_image.t
+@@
+ $m->form_with_fields( "AddCustomField-1" );
+ $m->tick( "AddCustomField-1", 0 );
+ $m->click_ok( "UpdateObjs" );
+-$m->content_contains("Object created");
++$m->content_contains("Added custom field Images to All Objects");
+
+
+ $m->submit_form_ok({
+
+diff --git a/t/web/cf_onqueue.t b/t/web/cf_onqueue.t
+--- a/t/web/cf_onqueue.t
++++ b/t/web/cf_onqueue.t
+@@
+ $m->tick( AddCustomField => 1 );
+ $m->click('UpdateCFs');
+
+- $m->content_contains('Object created', 'CF QueueCFTest enabled globally' );
++ $m->content_contains("Added custom field QueueCFTest to All Objects", 'CF QueueCFTest enabled globally' );
+ }
+
+ diag "Edit the CF value for default queue";
+
+diff --git a/t/web/cf_select_one.t b/t/web/cf_select_one.t
+--- a/t/web/cf_select_one.t
++++ b/t/web/cf_select_one.t
+@@
+ $m->tick( "AddCustomField" => $cfid );
+ $m->click('UpdateCFs');
+
+- $m->content_contains('Object created', 'TCF added to the queue' );
++ $m->content_contains("Added custom field $cf_name to General", 'TCF added to the queue' );
+ }
+
+ my $tid;
+
+diff --git a/t/web/ticket_preserve_basics.t b/t/web/ticket_preserve_basics.t
+--- a/t/web/ticket_preserve_basics.t
++++ b/t/web/ticket_preserve_basics.t
+@@
+ $m->form_with_fields('UpdateObjs');
+ $m->tick('AddCustomField-'.$cf->id => '0'); # Make CF global
+ $m->click('UpdateObjs');
+-$m->text_contains('Object created', 'CF applied globally');
++$m->text_contains("Added custom field CF1 to All Objects", 'CF applied globally');
+
+ # Test for preservation when a ticket is submitted and CF validation fails
+ for my $try (@form_tries) {
More information about the rt-commit
mailing list