Revision c96c4bb2
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/Controller/RequirementSpec.pm | ||
---|---|---|
176 | 176 |
$self->redirect_to(action => 'list'); |
177 | 177 |
} |
178 | 178 |
|
179 |
sub action_revert_to { |
|
180 |
my ($self, %params) = @_; |
|
181 |
|
|
182 |
return $self->js->error(t8('Cannot revert a versioned copy.'))->render($self) if $self->requirement_spec->working_copy_id; |
|
183 |
|
|
184 |
my $versioned_copy = SL::DB::RequirementSpec->new(id => $::form->{versioned_copy_id})->load; |
|
185 |
|
|
186 |
$self->requirement_spec->delete_items; |
|
187 |
$self->requirement_spec->copy_from( |
|
188 |
$versioned_copy, |
|
189 |
version_id => $versioned_copy->version_id, |
|
190 |
); |
|
191 |
|
|
192 |
flash_later('info', t8('The requirement spec has been reverted to version #1.', $self->requirement_spec->version->version_number)); |
|
193 |
$self->js->redirect_to($self->url_for(action => 'show', id => $self->requirement_spec->id))->render($self); |
|
194 |
} |
|
195 |
|
|
179 | 196 |
# |
180 | 197 |
# filters |
181 | 198 |
# |
Auch abrufbar als: Unified diff
Pflichtenhefte auf Versionen zurücksetzen können