From 72d38e4046669dfcc7cc4b80811bad50825f3821 Mon Sep 17 00:00:00 2001 From: Andrew Chilton Date: Tue, 6 May 2008 00:56:31 +1200 Subject: [PATCH] Add an AssignedTo field --- bin/cil | 9 +++++++-- lib/CIL/Issue.pm | 8 ++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/bin/cil b/bin/cil index 61f1a95..596b3e5 100755 --- a/bin/cil +++ b/bin/cil @@ -44,6 +44,7 @@ my $new_issue_text = <<"EOF"; Summary = Status =New CreatedBy =$gan <$gae> +AssignedTo =$gan <$gae> Labels = Description = <Summary; my $status = $issue->Status; my $created_by = $issue->CreatedBy; + my $assigned_to = $issue->AssignedTo; my $labels = $issue->Labels; my $description = $issue->Description; @@ -228,6 +230,7 @@ sub edit { Summary = $summary Status = $status CreatedBy = $created_by +AssignedTo = $assigned_to Labels = $labels Description = <$field( $issue_edited->$field() ); } if ( $issue->changed ) { @@ -331,7 +334,7 @@ sub display_issue_summary { $msg .= "\t"; $msg .= $issue->Status; $msg .= "\t"; - $msg .= $issue->CreatedBy; + $msg .= $issue->AssignedTo; $msg .= "\t"; $msg .= $issue->Summary; @@ -345,6 +348,7 @@ sub display_issue_short { field( 'Summary', $issue->Summary() ); field( 'Name', $issue->Name() ); field( 'CreatedBy', $issue->CreatedBy() ); + field( 'AssignedTo', $issue->AssignedTo() ); field( 'Inserted', $issue->Inserted() ); field( 'Status', $issue->Status() ); field( 'Labels', $issue->Labels() ); @@ -359,6 +363,7 @@ sub display_issue_full { field( 'Name', $issue->Name() ); field( 'Status', $issue->Status() ); field( 'CreatedBy', $issue->CreatedBy() ); + field( 'AssignedTo', $issue->AssignedTo() ); field( 'Inserted', $issue->Inserted() ); field( 'Updated', $issue->Inserted() ); field( 'Labels', $issue->Labels() ); diff --git a/lib/CIL/Issue.pm b/lib/CIL/Issue.pm index d94e32e..84b86ee 100644 --- a/lib/CIL/Issue.pm +++ b/lib/CIL/Issue.pm @@ -29,9 +29,9 @@ use Config::IniFiles; use YAML qw(LoadFile DumpFile); use base qw(CIL::Base); -__PACKAGE__->mk_accessors(qw(Name Summary Status Labels Comments)); +__PACKAGE__->mk_accessors(qw(Name Summary AssignedTo Status Labels Comments)); -my @FIELDS = ( qw(Name Summary Description CreatedBy Status Labels Comments) ); +my @FIELDS = ( qw(Name Summary Description CreatedBy AssignedTo Status Labels Comments) ); ## ---------------------------------------------------------------------------- @@ -63,7 +63,7 @@ sub new_load_issue { my $issue = CIL::Issue->new(); # do the issue - foreach my $field ( qw(Summary Name Description CreatedBy Status Labels Inserted Updated) ) { + foreach my $field ( qw(Summary Name Description CreatedBy AssignedTo Status Labels Inserted Updated) ) { # modify the data directly, otherwise Updated will kick in $issue->{data}{$field} = $data->{$field}; } @@ -93,7 +93,7 @@ sub new_parse_issue { } my $issue = CIL::Issue->new(); - foreach my $field ( qw(Summary Name Description CreatedBy Status Labels Inserted Updated) ) { + foreach my $field ( qw(Summary Name Description CreatedBy AssignedTo Status Labels Inserted Updated) ) { # modify the data directly, otherwise Updated will kick in my $value = $cfg->val( 'Issue', $field ); next unless defined $value; -- 2.39.5