From 41c7d068f954e062b4da0675b5782211b8ad10c3 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Thu, 23 Jun 2011 14:26:26 +0100 Subject: add problem state_column to comment --- perllib/FixMyStreet/DB/Result/Comment.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm') diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 68175dead..81aa18b95 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -52,6 +52,8 @@ __PACKAGE__->add_columns( { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, "anonymous", { data_type => "boolean", is_nullable => 0 }, + "problem_state", + { data_type => "text", is_nullable => 1 }, ); __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( @@ -68,8 +70,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-24 15:32:43 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:71bSUgPf3uW607g2EGl/Vw +# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-06-23 14:25:34 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:scnPU5RAGLnT0fY1gM6Z5A use DateTime::TimeZone; use Image::Size; -- cgit v1.2.3 From 7d097bb489deea35ef4fda6002a0d6936bf6b649 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Thu, 23 Jun 2011 17:07:10 +0100 Subject: indicate changes state in update meta information --- perllib/FixMyStreet/DB/Result/Comment.pm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm') diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 81aa18b95..76c96e581 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -146,6 +146,22 @@ sub get_photo_params { return $photo; } +=head2 meta_problem_state + +Returns a string suitable for display in the update meta section. +Mostly removes the '- council/user' bit from fixed states + +=cut + +sub meta_problem_state { + my $self = shift; + + my $state = $self->problem_state; + $state =~ s/ -.*$//; + + return $state; +} + # we need the inline_constructor bit as we don't inherit from Moose __PACKAGE__->meta->make_immutable( inline_constructor => 0 ); -- cgit v1.2.3 From a20fc533b0f10646814742f1348c5f9141217efa Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Mon, 27 Jun 2011 11:03:57 +0100 Subject: change to use from_council in users table and store the council id in there so we can check that the problem is for the council the user is from --- perllib/FixMyStreet/DB/Result/Comment.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm') diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 9ed9d8b48..00f88e136 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -70,8 +70,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-06-23 14:25:34 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:scnPU5RAGLnT0fY1gM6Z5A +# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-06-27 10:07:32 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ilLn3dlagg5COdpZDmzrVQ use DateTime::TimeZone; use Image::Size; -- cgit v1.2.3