From: Moritz Bunkus Date: Mon, 22 Apr 2013 09:52:31 +0000 (+0200) Subject: Pflichtenheftversion nach Ă„nderung Basisdaten invalidieren X-Git-Tag: release-3.2.0beta~467^2~186 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b4fc493375b77b6e27414fe3f7773f8b1add00fd;p=kivitendo-erp.git Pflichtenheftversion nach Ă„nderung Basisdaten invalidieren --- diff --git a/SL/Controller/RequirementSpec.pm b/SL/Controller/RequirementSpec.pm index c119ea3b0..cac70a980 100644 --- a/SL/Controller/RequirementSpec.pm +++ b/SL/Controller/RequirementSpec.pm @@ -274,7 +274,7 @@ sub create_or_update { if ($::request->is_ajax) { my $html = $self->render('requirement_spec/_header', { output => 0 }); - return $self->js + return $self->invalidate_version ->replaceWith('#requirement-spec-header', $html) ->flash('info', t8('The requirement spec has been saved.')) ->render($self); @@ -348,4 +348,15 @@ sub prepare_report { $self->disable_pagination if $report->{options}{output_format} =~ /^(pdf|csv)$/i; } +sub invalidate_version { + my ($self) = @_; + + my $rspec = SL::DB::RequirementSpec->new(id => $self->requirement_spec->id)->load; + $rspec->invalidate_version; + + my $html = $self->render('requirement_spec/_version', { output => 0 }, requirement_spec => $rspec); + return $self->js->html('#requirement_spec_version', $html); +} + + 1;