- Fixed a bug that caused workflows to fail if collaboration systems and
posts for that CS were in the same version tag at commit time.
This commit is contained in:
parent
9f232b4049
commit
6c24ea7aeb
2 changed files with 13 additions and 2 deletions
|
|
@ -2,6 +2,8 @@
|
||||||
- Added server side spellchecker (Martin Kamerbeek / Procolix)
|
- Added server side spellchecker (Martin Kamerbeek / Procolix)
|
||||||
|
|
||||||
7.1.2
|
7.1.2
|
||||||
|
- Fixed a bug that caused workflows to fail if collaboration systems and
|
||||||
|
posts for that CS were in the same version tag at commit time.
|
||||||
|
|
||||||
|
|
||||||
7.1.1
|
7.1.1
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ Commits all assets edited under a version tag, and then sets the version tag to
|
||||||
|
|
||||||
sub commit {
|
sub commit {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
foreach my $asset (@{$self->getAssets({"reverse"=>1})}) {
|
foreach my $asset (@{$self->getAssets({"byLineage"=>1})}) {
|
||||||
$asset->commit;
|
$asset->commit;
|
||||||
}
|
}
|
||||||
$self->{_data}{isCommitted} = 1;
|
$self->{_data}{isCommitted} = 1;
|
||||||
|
|
@ -145,6 +145,10 @@ A hash reference containing options to change the output.
|
||||||
|
|
||||||
A boolean that will reverse the order of the assets. The default is to return the assets in descending order.
|
A boolean that will reverse the order of the assets. The default is to return the assets in descending order.
|
||||||
|
|
||||||
|
=head4 byLineage
|
||||||
|
|
||||||
|
A boolean that will return the asset list ordered by lineage, ascending. Cannot be used in conjunction with "reverse".
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub getAssets {
|
sub getAssets {
|
||||||
|
|
@ -152,7 +156,12 @@ sub getAssets {
|
||||||
my $options = shift;
|
my $options = shift;
|
||||||
my @assets = ();
|
my @assets = ();
|
||||||
my $direction = $options->{reverse} ? "asc" : "desc";
|
my $direction = $options->{reverse} ? "asc" : "desc";
|
||||||
my $sth = $self->session->db->read("select asset.assetId,asset.className,assetData.revisionDate from assetData left join asset on asset.assetId=assetData.assetId where assetData.tagId=? order by revisionDate ".$direction, [$self->getId]);
|
my $sort = "revisionDate";
|
||||||
|
if ($options->{byLineage}) {
|
||||||
|
$sort = "lineage";
|
||||||
|
$direction = "asc";
|
||||||
|
}
|
||||||
|
my $sth = $self->session->db->read("select asset.assetId,asset.className,assetData.revisionDate from assetData left join asset on asset.assetId=assetData.assetId where assetData.tagId=? order by ".$sort." ".$direction, [$self->getId]);
|
||||||
while (my ($id,$class,$version) = $sth->array) {
|
while (my ($id,$class,$version) = $sth->array) {
|
||||||
push(@assets, WebGUI::Asset->new($self->session,$id,$class,$version));
|
push(@assets, WebGUI::Asset->new($self->session,$id,$class,$version));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue