Prevent an imported package from changing the a current asset's status from pending to anything else.
This commit is contained in:
parent
ff3bb6f5b9
commit
911e30c43c
2 changed files with 12 additions and 4 deletions
|
|
@ -28,6 +28,7 @@
|
|||
- fixed #9681: Form-related template errors in gallery
|
||||
- fixed #9683: Problem with EMS related workflow
|
||||
- fixed #9611: Transaction Manage View, no go in ie6 (Henry Tang, Long Term Results B.v.)
|
||||
- fixed #9686: Importing a package twice locks assets forever.
|
||||
|
||||
7.6.10
|
||||
- fixed #9577: WebGUI::Form::Url::getValue returns blank rather than undef for blank fields
|
||||
|
|
|
|||
|
|
@ -149,13 +149,20 @@ sub importAssetData {
|
|||
}
|
||||
if ($revisionExists) { # update an existing revision
|
||||
$asset = WebGUI::Asset->new($self->session, $id, $class, $version);
|
||||
|
||||
##If the existing asset is not committed, do not allow the new package data to
|
||||
##change the version control status.
|
||||
if ( $asset->get('status') eq 'pending'
|
||||
&& $properties{'status'} ne 'pending' ) {
|
||||
delete $properties{status};
|
||||
}
|
||||
$error->info("Updating an existing revision of asset $id");
|
||||
$asset->update($data->{properties});
|
||||
$asset->update(\%properties);
|
||||
##Pending assets are assigned a new version tag
|
||||
if ($data->{properties}->{status} eq 'pending') {
|
||||
if ($properties{status} eq 'pending') {
|
||||
$self->session->db->write(
|
||||
'update assetData set tagId=? where assetId=? and revisionDate='.$data->{properties}->{revisionDate},
|
||||
[WebGUI::VersionTag->getWorking($self->session)->getId, $data->{properties}->{assetId}]
|
||||
'update assetData set tagId=? where assetId=? and revisionDate=?',
|
||||
[WebGUI::VersionTag->getWorking($self->session)->getId, $properties{assetId}, $properties{revisionDate},]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue