[Rt-commit] rt branch, cf-date, updated. rt-3.8.8-180-g66950ec

? sunnavy sunnavy at bestpractical.com
Thu Jul 22 00:47:35 EDT 2010


The branch, cf-date has been updated
       via  66950ec3d14066c3066a550dcac8527a604c8fda (commit)
       via  e9557499435d30b8f6be8eba823d7ec2c71c2026 (commit)
       via  49de5af1ea266222b837fcb198002eac28f75ba5 (commit)
       via  409adf7af3e1949ab2986fa36780d4090f67f3da (commit)
       via  683e7442f3f11f33346778ca47274b995e27b32c (commit)
       via  4e3a3598e897746814929f192e1e88fad7e6ea78 (commit)
       via  03fd1f57f6042cbcfe7c5e9bd3eb74f1c40fc875 (commit)
       via  b36e63ba8f4f8ee077a1d2f1262f06844e5ef370 (commit)
       via  37d11026ae08d6992ce0bdcdd226af7359107390 (commit)
       via  29197738ef8c6d6cc5672acc88ff7b60464acde6 (commit)
       via  e3b68b210a1f1a7837eb96e53084e587d0119db0 (commit)
       via  fae1ed4bee381d96b27442fe1df484d05cba657d (commit)
       via  54c0d9b635603f1fd53d17777a8b44b59c03abb3 (commit)
       via  78044b3724db6356af2954710fff45b6d5599db8 (commit)
       via  b4aebcf01efdc91ee7e70eea5890d20647fb9198 (commit)
       via  d83e0f636e2e3b789a0c5e7a5c25e157b9c11dc4 (commit)
       via  b93716a7c7b36b88e57e56dab30d6a6b6bf2ca85 (commit)
       via  edbf887976426d4bd3d3e13135ca2d2af47cf9f2 (commit)
       via  bd7b180e139b6fee4019609ebae5ab68c999356b (commit)
       via  19c9ce303999a2fe129562d20387b61fbbfdff75 (commit)
       via  7b8bcff9e419200b0e6f51169cc7c6c4eb1f3704 (commit)
       via  192bfd1eb90e68eaaf897c83236c48d4f7341507 (commit)
       via  fca2797a2b6ab91e28f877730452039f248d2b88 (commit)
       via  bda1fdbd3ccb62362f4a46bef2c1ddcd075916da (commit)
       via  31f293ea27c830872fee8b1d8977cfc4bcb6749d (commit)
       via  5890f1da2313035a400eaf2e98ef7585913619be (commit)
       via  0874e603ec015d24ff53d9ef160f4d0209e60ce9 (commit)
       via  ee754f490b6f6868a56f002ba324a05545cda614 (commit)
       via  cdc72fee298e9a27682c5f2ff3968f6beae41642 (commit)
       via  ead9056e2c7da9611a4b51b82d0ac695e3cc1505 (commit)
       via  5d5ecff5dc35fc4e8ac995b718b34d015796ffdc (commit)
       via  8800a8313023e63ff2a20e831f2d8e454747d41d (commit)
       via  eef16ffc57066d1136fd7fa3c2880470f315007a (commit)
       via  77ef13035e1b5d0fb9a5f71c6b4b8a71b5ada166 (commit)
       via  9ae6a5d999e1e526a01d2b94c53d6956bfb0d288 (commit)
       via  eed4c3ad66b735bc2c032dd0478d05854bfa5ba3 (commit)
       via  cc25c4749f366d7cc5159885c30e9678e99b7921 (commit)
       via  683e5753c7efd1e59fa59b1db0f5280f80ab4e4b (commit)
       via  b2640d1f394aefded91138d0469b661ed2b364cc (commit)
       via  4f9ee98c3b34a38f0d0ef7d5102320e144fb7e49 (commit)
       via  f89cfd3deba6bf32107880db28a0209aff4fe83e (commit)
       via  ede2985d02ea6092988b14e47616de71f4cf04ba (commit)
       via  0b8561fa7a434ff849f211f9d052d5958756aa95 (commit)
       via  8b1e5dd11d15e87fc550f25c73e8484bae71c6a4 (commit)
       via  7c0c812c477cf7e481e8ee365bccda0df5651ad7 (commit)
       via  9c850f37efad2f744abb3594ac9e0589885861c8 (commit)
       via  f887842604e32173216951da7a5a07ab12a93c06 (commit)
       via  8fb5931c5b3c8344d9265d0c525618c1d0f940b0 (commit)
       via  6936d3403005a6004b8a9dff5c1d8574224800a0 (commit)
       via  138640897857177bd38cb75c5a9cb83d3f12158f (commit)
       via  31f4e2394efee01fb6292d806a35b35706f5f3fc (commit)
       via  41d51f1c9edaa671fa08dd6e4eeebb213a781750 (commit)
       via  0d04a0ebf31f6c8dde9831518ed50068470dd6cc (commit)
       via  fde9e681c3fab37c9482c7a39d42f446b35156e4 (commit)
       via  83ace0a90979429c8784623f0dde1d4d638c362e (commit)
       via  d4dd2aebe8564e7a3de947c3c95650e2b753ee51 (commit)
       via  2e71bebadd6703ae50f9c3672eea8987f637da71 (commit)
       via  1c1d8a202f6d012485f2f0b4fc4cb94ea5dd902d (commit)
       via  e1f8be744fbd91b1448f15613b9fb3aebdc25ce1 (commit)
       via  9d1b85ef8ecc58f80f29581bb7feecf8ea4a73f9 (commit)
       via  9c3e93a0ac550c894cba45d8b4c264d50c9a2399 (commit)
       via  69642a9912b9b8feea4ccd53c97f7c754c252048 (commit)
       via  7cfa19b2076252e593d9b3adbb2bf978898379fb (commit)
      from  3f9318c84748c4255383d3033ac332d45ec66fd8 (commit)

Summary of changes:
 etc/RT_Config.pm.in                                |   22 +-
 lib/RT/Config.pm                                   |  121 +-
 lib/RT/CustomFields_Overlay.pm                     |   53 +-
 lib/RT/Dashboard.pm                                |   32 +-
 lib/RT/I18N.pm                                     |   30 +-
 lib/RT/I18N/ar.po                                  |  426 ++-
 lib/RT/I18N/bg.po                                  |  428 ++-
 lib/RT/I18N/cs.po                                  |  426 ++-
 lib/RT/I18N/da.po                                  |  428 ++-
 lib/RT/I18N/de.po                                  |  472 ++--
 lib/RT/I18N/{pt_PT.po => el.po}                    | 2818 +++++++-------
 lib/RT/I18N/en.po                                  |    4 +-
 lib/RT/I18N/{pt_PT.po => en_GB.po}                 | 4100 +++++++++-----------
 lib/RT/I18N/es.po                                  |  486 ++--
 lib/RT/I18N/{ar.po => et.po}                       | 2320 ++++++------
 lib/RT/I18N/fi.po                                  |  426 ++-
 lib/RT/I18N/fr.po                                  |  428 ++-
 lib/RT/I18N/he.po                                  |  426 ++-
 lib/RT/I18N/hr.po                                  |  424 ++-
 lib/RT/I18N/hu.po                                  |  814 ++--
 lib/RT/I18N/id.po                                  |  426 ++-
 lib/RT/I18N/it.po                                  |  428 ++-
 lib/RT/I18N/ja.po                                  |  428 ++-
 lib/RT/I18N/{cs.po => lt.po}                       | 3922 +++++++++----------
 lib/RT/I18N/nb.po                                  |  594 ++--
 lib/RT/I18N/nl.po                                  |  426 ++-
 lib/RT/I18N/nn.po                                  |  580 ++--
 lib/RT/I18N/pl.po                                  |  428 ++-
 lib/RT/I18N/pt.po                                  |  426 ++-
 lib/RT/I18N/pt_BR.po                               |  426 ++-
 lib/RT/I18N/pt_PT.po                               |  456 ++--
 lib/RT/I18N/rt.pot                                 |  420 ++-
 lib/RT/I18N/ru.po                                  |  488 ++--
 lib/RT/I18N/sv.po                                  |  428 ++-
 lib/RT/I18N/tr.po                                  |  710 ++--
 lib/RT/I18N/zh_CN.po                               |  436 ++-
 lib/RT/I18N/zh_TW.po                               |  424 ++-
 lib/RT/Interface/Email.pm                          |    2 +-
 lib/RT/Interface/Web.pm                            |   67 +-
 lib/RT/SavedSearch.pm                              |   18 +
 lib/RT/SavedSearches.pm                            |   39 +-
 lib/RT/SharedSetting.pm                            |   42 +
 lib/RT/Template_Overlay.pm                         |    2 +-
 share/html/Admin/CustomFields/Modify.html          |    2 +
 share/html/Admin/CustomFields/index.html           |    4 +
 share/html/Admin/Elements/AddCustomFieldValue      |    6 +-
 share/html/Admin/Elements/EditCustomFieldValues    |    6 +-
 share/html/Admin/Groups/UserRights.html            |    6 +-
 share/html/Admin/Groups/index.html                 |    2 +
 share/html/Admin/Queues/Modify.html                |    2 -
 share/html/Admin/Users/MyRT.html                   |    2 +-
 share/html/Admin/Users/index.html                  |    3 +
 .../html/Dashboards/Elements/DashboardsForObjects  |    4 +-
 share/html/Dashboards/Elements/ListOfDashboards    |    2 +-
 share/html/Dashboards/Elements/Tabs                |    2 +-
 share/html/Dashboards/Modify.html                  |    3 +-
 share/html/Dashboards/Queries.html                 |    2 +-
 share/html/Elements/CreateTicket                   |    9 +-
 share/html/Elements/EmailInput                     |    2 +-
 share/html/Elements/Menu                           |    2 +
 share/html/Elements/QuickCreate                    |    6 +-
 .../{RT__Template => RT__SavedSearch}/ColumnMap    |   62 +-
 share/html/Elements/SavedSearches                  |   29 +
 share/html/Elements/SelectNewTicketQueue           |    7 +
 share/html/Elements/SelectQueue                    |   20 +-
 share/html/Elements/SelectStatus                   |   12 +-
 share/html/Elements/ShowSearch                     |    1 +
 .../{Toggle/TicketBookmark => TicketHistory}       |   15 +-
 share/html/NoAuth/css/web2/ticket.css              |    1 +
 share/html/Prefs/MyRT.html                         |    2 +-
 share/html/Search/Build.html                       |    2 +-
 share/html/Search/Elements/DisplayOptions          |   29 +-
 share/html/Search/Elements/EditSearches            |    4 +-
 share/html/Search/Results.tsv                      |    5 +-
 share/html/Search/Simple.html                      |    6 +-
 share/html/Ticket/Create.html                      |    1 +
 share/html/Ticket/Display.html                     |   22 +-
 .../Elements/ClickToShowHistory}                   |   21 +-
 share/html/Ticket/Elements/ShowSummary             |    1 +
 .../Ticket/Elements/ShowTransactionAttachments     |    2 +
 share/html/Ticket/Elements/Tabs                    |    6 +-
 share/html/Ticket/Elements/UpdateCc                |    2 +
 share/html/Tools/Elements/Tabs                     |   16 +-
 share/html/Tools/index.html                        |   18 +-
 share/html/Widgets/ComboBox                        |    6 +-
 share/html/Widgets/SavedSearch                     |    2 +-
 t/api/config.t                                     |   33 +
 t/mail/mime_decoding.t                             |   13 +-
 t/web/compilation_errors.t                         |    6 +-
 89 files changed, 13523 insertions(+), 13186 deletions(-)
 copy lib/RT/I18N/{pt_PT.po => el.po} (81%)
 copy lib/RT/I18N/{pt_PT.po => en_GB.po} (71%)
 copy lib/RT/I18N/{ar.po => et.po} (83%)
 copy lib/RT/I18N/{cs.po => lt.po} (70%)
 mode change 100755 => 100644
 copy share/html/Elements/{RT__Template => RT__SavedSearch}/ColumnMap (75%)
 create mode 100644 share/html/Elements/SavedSearches
 copy share/html/Helpers/{Toggle/TicketBookmark => TicketHistory} (80%)
 copy share/html/{Admin/Elements/SelectCustomFieldType => Ticket/Elements/ClickToShowHistory} (85%)
 mode change 100755 => 100644
 create mode 100644 t/api/config.t

- Log -----------------------------------------------------------------
commit 409adf7af3e1949ab2986fa36780d4090f67f3da
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Jul 21 12:21:33 2010 +0800

    (Add|Delete|Update)Option for Config

diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 2e1bd70..2cf66f3 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -939,6 +939,87 @@ sub Options {
     return @res;
 }
 
+=head2 AddOption( Name => '', Section => '', ... )
+
+=cut
+
+sub AddOption {
+    my $self = shift;
+    my %args = (
+        Name            => undef,
+        Section         => undef,
+        Overridable     => 0,
+        SortOrder       => undef,
+        Widget          => '/Widgets/Form/String',
+        WidgetArguments => {},
+        @_
+    );
+
+    unless ( $args{Name} ) {
+        $RT::Logger->error("Need Name to add a new config");
+        return;
+    }
+
+    unless ( $args{Section} ) {
+        $RT::Logger->error("Need Section to add a new config option");
+        return;
+    }
+
+    $META{ delete $args{Name} } = \%args;
+}
+
+=head2 DeleteOption( Name => '' )
+
+=cut
+
+sub DeleteOption {
+    my $self = shift;
+    my %args = (
+        Name            => undef,
+        @_
+        );
+    if ( $args{Name} ) {
+        delete $META{$args{Name}};
+    }
+    else {
+        $RT::Logger->error("Need Name to remove a config option");
+        return;
+    }
+}
+
+=head2 UpdateOption( Name => '' ), Section => '', ... )
+
+=cut
+
+sub UpdateOption {
+    my $self = shift;
+    my %args = (
+        Name            => undef,
+        Section         => undef,
+        Overridable     => undef,
+        SortOrder       => undef,
+        Widget          => undef,
+        WidgetArguments => undef,
+        @_
+    );
+
+    unless ( $args{Name} ) {
+        $RT::Logger->error("Need Name to update a new config");
+        return;
+    }
+
+    unless ( exists $META{ $args{Name} } ) {
+        $RT::Logger->error("Config $args{Name} doesn't exist");
+        return;
+    }
+
+    for my $type (qw/Section Overridable SortOrder Widget WidgetArguments/) {
+        next unless defined $args{$type};
+        $META{ $args{Name} }{$type} = $args{$type};
+    }
+    return 1;
+}
+
 eval "require RT::Config_Vendor";
 if ($@ && $@ !~ qr{^Can't locate RT/Config_Vendor.pm}) {
     die $@;
diff --git a/t/api/config.t b/t/api/config.t
new file mode 100644
index 0000000..8e24be0
--- /dev/null
+++ b/t/api/config.t
@@ -0,0 +1,33 @@
+use strict;
+use warnings;
+use RT;
+use RT::Test tests => 9;
+
+ok(
+    RT::Config->AddOption(
+        Name    => 'foo',
+        Section => 'bar',
+    ),
+    'added option foo'
+);
+
+my $meta = RT::Config->Meta('foo');
+is( $meta->{Section}, 'bar', 'Section is bar' );
+is( $meta->{Widget}, '/Widgets/Form/String', 'default Widget is string' );
+is_deeply( $meta->{WidgetArguments},
+    {},, 'default WidgetArguments is empty hashref' );
+
+ok(
+    RT::Config->UpdateOption(
+        Name    => 'foo',
+        Section => 'baz',
+        Widget => '/Widgets/Form/Boolean',
+    ),
+    'updated option foo to section baz'
+);
+is( $meta->{Section}, 'baz', 'section is updated to baz' );
+is( $meta->{Widget}, '/Widgets/Form/Boolean', 'widget is updated to boolean' );
+
+ok( RT::Config->DeleteOption( Name => 'foo' ), 'removed option foo' );
+is( RT::Config->Meta('foo'), undef, 'foo is indeed deleted' );
+

commit 49de5af1ea266222b837fcb198002eac28f75ba5
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Jul 21 13:15:55 2010 +0800

    no hardcode lists for config

diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 2cf66f3..b00e07d 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -1003,19 +1003,21 @@ sub UpdateOption {
         @_
     );
 
-    unless ( $args{Name} ) {
+    my $name = delete $args{Name};
+
+    unless ( $name ) {
         $RT::Logger->error("Need Name to update a new config");
         return;
     }
 
-    unless ( exists $META{ $args{Name} } ) {
-        $RT::Logger->error("Config $args{Name} doesn't exist");
+    unless ( exists $META{$name} ) {
+        $RT::Logger->error("Config $name doesn't exist");
         return;
     }
 
-    for my $type (qw/Section Overridable SortOrder Widget WidgetArguments/) {
+    for my $type ( keys %args ) {
         next unless defined $args{$type};
-        $META{ $args{Name} }{$type} = $args{$type};
+        $META{$name}{$type} = $args{$type};
     }
     return 1;
 }

commit e9557499435d30b8f6be8eba823d7ec2c71c2026
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Jul 22 11:45:08 2010 +0800

    a bit doc in simple search page, see also #14977

diff --git a/share/html/Search/Simple.html b/share/html/Search/Simple.html
index c77ee77..c2fdd01 100644
--- a/share/html/Search/Simple.html
+++ b/share/html/Search/Simple.html
@@ -62,6 +62,8 @@
 <p><&|/l&>Searching the full text of every ticket can take a long time, but if you need to do it, you can search for any word in full ticket history for any word by typing <b>fulltext:<i>word</i></b>.</&></p>
 <p><&|/l&>RT will look for anything else you enter in ticket subjects.</&></p>
 
+<p><&|/l&>Please note that only tickets with active status are displayed here. For more powerful searches please visit the <a href="<%RT->Config->Get('WebPath')%>/Search/Build.html">search builder interface</a>.</&></p>
+
 <br />
 <br />
 <div align="center">

commit 66950ec3d14066c3066a550dcac8527a604c8fda
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Jul 22 12:15:47 2010 +0800

    word tweak

diff --git a/share/html/Search/Simple.html b/share/html/Search/Simple.html
index c2fdd01..9b3ecc0 100644
--- a/share/html/Search/Simple.html
+++ b/share/html/Search/Simple.html
@@ -62,7 +62,8 @@
 <p><&|/l&>Searching the full text of every ticket can take a long time, but if you need to do it, you can search for any word in full ticket history for any word by typing <b>fulltext:<i>word</i></b>.</&></p>
 <p><&|/l&>RT will look for anything else you enter in ticket subjects.</&></p>
 
-<p><&|/l&>Please note that only tickets with active status are displayed here. For more powerful searches please visit the <a href="<%RT->Config->Get('WebPath')%>/Search/Build.html">search builder interface</a>.</&></p>
+% my $status_str = join ', ', map { loc($_) } RT->Config->Get('ActiveStatus');
+<p><&|/l, $status_str&>Please note that only tickets with one of these statuses( [_1] ) are displayed here. For more powerful searches please visit the <a href="<%RT->Config->Get('WebPath')%>/Search/Build.html">search builder interface</a>.</&></p>
 
 <br />
 <br />

-----------------------------------------------------------------------


More information about the Rt-commit mailing list