]> git.mjollnir.org Git - cil.git/commitdiff
Make sure each comment knows who it's parent is.
authorAndrew Chilton <andychilton@gmail.com>
Sat, 21 Jun 2008 11:17:13 +0000 (23:17 +1200)
committerAndrew Chilton <andychilton@gmail.com>
Sat, 21 Jun 2008 11:17:13 +0000 (23:17 +1200)
bin/cil
issues/c_feb65ae7.cil
lib/CIL/Comment.pm

diff --git a/bin/cil b/bin/cil
index e0926fb0e8c63244be428c39396fbc386fb21371..9ee4a0b6eaadf8041bf97febf259afa354fa3f00 100755 (executable)
--- a/bin/cil
+++ b/bin/cil
@@ -255,6 +255,9 @@ sub comment {
     # we've got the comment, so let's name it
     my $unique_str = $comment->Inserted . $issue->Description;
     $comment->set_name( substr(md5_hex($unique_str), 0, 8) );
+
+    # finally, tell it who it's parent is and then save
+    $comment->Issue( $issue->name );
     $comment->save($cil);
 
     # add the comment to the issue, update it's timestamp and save it out
@@ -325,7 +328,18 @@ sub display_issue {
 sub display_issue_full {
     my ($cil, $issue) = @_;
 
-    display_issue( $cil, $issue );
+    separator();
+    title( 'Issue ' . $issue->name() );
+    field( 'Summary', $issue->Summary() );
+    field( 'Status', $issue->Status() );
+    field( 'CreatedBy', $issue->CreatedBy() );
+    field( 'AssignedTo', $issue->AssignedTo() );
+    field( 'Label', $_ )
+        foreach sort @{$issue->Label()};
+    field( 'Inserted', $issue->Inserted() );
+    field( 'Updated', $issue->Inserted() );
+    text('Description', $issue->Description());
+    separator();
 
     my $comments = $cil->get_comments_for( $issue );
     foreach my $comment ( @$comments ) {
index dcdfaf2d43a8b9313c1d2289e19ee754f870ac07..d4e89f3fd98b22e728f4839de41a023625e41884 100644 (file)
@@ -1,4 +1,4 @@
-Issue: 
+Issue: 5c88cb30
 CreatedBy: Andrew Chilton <andychilton@gmail.com>
 Inserted: 2008-06-21T10:57:47
 Updated: 2008-06-21T10:57:47
index c04656912bee6677ea1bc4a55e6d7792e7709776..355466bca0ddb7f139030f0c8df666048df1166f 100644 (file)
@@ -27,6 +27,7 @@ use Carp;
 use Config::IniFiles;
 
 use base qw(CIL::Base);
+__PACKAGE__->mk_accessors(qw(Issue));
 
 my @FIELDS = ( qw(Issue CreatedBy Inserted Updated Description) );
 my $cfg = {