[Bps-public-commit] App-Changeloggr branch, master, updated. 3060b9d9ff2ba0cada647b14fea80073e6d0b843

sartak at bestpractical.com sartak at bestpractical.com
Thu Jul 30 14:17:12 EDT 2009


The branch, master has been updated
       via  3060b9d9ff2ba0cada647b14fea80073e6d0b843 (commit)
       via  bf96732c1b000711c183ccf0232508b6c7f0be89 (commit)
      from  55538ed5e8469041ad7e5cd20de780d39652542e (commit)

Summary of changes:
 bin/flip-changes                    |   13 +++++++------
 lib/App/Changeloggr/Model/Change.pm |    7 +++++++
 2 files changed, 14 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit bf96732c1b000711c183ccf0232508b6c7f0be89
Author: Shawn M Moore <sartak at gmail.com>
Date:   Thu Jul 30 14:16:47 2009 -0400

    Change->importances

diff --git a/lib/App/Changeloggr/Model/Change.pm b/lib/App/Changeloggr/Model/Change.pm
index 9af43ab..930f86f 100644
--- a/lib/App/Changeloggr/Model/Change.pm
+++ b/lib/App/Changeloggr/Model/Change.pm
@@ -71,6 +71,13 @@ sub rewordings {
     return $rewordings;
 }
 
+sub importances {
+    my $self = shift;
+    my $importances = App::Changeloggr::Model::ImportanceCollection->new;
+    $importances->limit( column => 'change_id', value => $self->id );
+    return $importances;
+}
+
 sub grouped_votes {
     my $self = shift;
     my $votes = $self->votes;

commit 3060b9d9ff2ba0cada647b14fea80073e6d0b843
Author: Shawn M Moore <sartak at gmail.com>
Date:   Thu Jul 30 14:16:59 2009 -0400

    Move rewordings and importances forward in flip-changes

diff --git a/bin/flip-changes b/bin/flip-changes
index 3545f0c..e23959c 100644
--- a/bin/flip-changes
+++ b/bin/flip-changes
@@ -22,12 +22,13 @@ while (my $changelog = <$changelogs>) {
         my ($ok, $msg) = $new_change->create(%values);
         print "created $ok - $msg\n";
 
-        my $votes = $change->votes;
-        while (my $vote = <$votes>) {
-            $vote->__set(
-                column => 'change_id',
-                value  => $new_change->id,
-            );
+        for my $collection ($change->votes, $change->rewordings, $change->importances) {
+            while (my $record = <$collection>) {
+                $record->__set(
+                    column => 'change_id',
+                    value  => $new_change->id,
+                );
+            }
         }
 
         ($ok, $msg) = $change->delete;

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



More information about the Bps-public-commit mailing list