[Rt-commit] rt branch, lcore, updated. 704f7f33e51b2981d0fbd9f2582fb7eab6bfb64c

clkao at bestpractical.com clkao at bestpractical.com
Sun Sep 6 06:10:45 EDT 2009


The branch, lcore has been updated
       via  704f7f33e51b2981d0fbd9f2582fb7eab6bfb64c (commit)
       via  1856227e8003553bb826efb5f0a8b529e0609381 (commit)
      from  a1f3d5495f3f040dfb14455c3978be8f45429ab3 (commit)

Summary of changes:
 lib/RT/Lorzy.pm    |    3 +++
 t/lorzy/accessor.t |    7 ++++++-
 2 files changed, 9 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 1856227e8003553bb826efb5f0a8b529e0609381
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Sun Sep 6 16:51:07 2009 +0800

    more known types for jdbi columns.

diff --git a/lib/RT/Lorzy.pm b/lib/RT/Lorzy.pm
index 52603c8..8c82c1e 100644
--- a/lib/RT/Lorzy.pm
+++ b/lib/RT/Lorzy.pm
@@ -77,6 +77,9 @@ sub install_ticket_accessors {
         my $name = $column->name;
         my $type = $column->type;
         $type = $type =~ m/^varchar/ ? 'Str'
+              : $type eq 'timestamp' ? 'DateTime'
+              : $type eq 'boolean'   ? 'Bool'
+              : $type eq 'smallint'  ? 'Bool'
               : $type =~ m/int$/     ? 'Int'
               : $type eq 'integer'   ? 'Int'
               : $type eq 'serial'    ? 'Int'

commit 704f7f33e51b2981d0fbd9f2582fb7eab6bfb64c
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Sun Sep 6 16:52:12 2009 +0800

    test for list of ticket accessors.

diff --git a/t/lorzy/accessor.t b/t/lorzy/accessor.t
index 34b6ffb..0473e16 100644
--- a/t/lorzy/accessor.t
+++ b/t/lorzy/accessor.t
@@ -1,4 +1,4 @@
-use Test::More tests => 3;
+use Test::More tests => 4;
 use RT::Test;
 
 use strict;
@@ -20,3 +20,8 @@ my $ticket = RT::Model::Ticket->new(current_user => RT->system_user );
 my ($rv, $msg) = $ticket->create( subject => 'lorzy test', queue => $queue->name, requestor => 'foo at localhost' );
 
 is( $ticket_subject->apply($ticket), 'lorzy test' );
+
+my $x = $l->env->find_functions_by_type(['RT::Model::Ticket']);
+
+is_deeply [sort map { s/^RT::Model::Ticket\.// ? $_ : () } keys %$x],
+    [qw(created creator disabled due effective_id final_priority id initial_priority issue_statement last_updated last_updated_by owner priority queue resolution resolved started starts status subject time_estimated time_left time_worked told type)];

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


More information about the Rt-commit mailing list