plainblack.com
Username Password
search
Bookmark and Share
View All Tickets
duplicate does not duplicate keywords  (#8776)
Issue

When duplicating assets keywords are not copied.

A patch is included below. Note that this patch is not against the latest revision (otherwise I would've applied it myself), but rather against rev. 7438.

Application is easy though. The code should be appended to the end of WebGUI::AssetClipboard->duplicate, just before the return statement.


Diff:

[code]

martin@martin:/data/WebGUI/lib$ svn diff WebGUI/AssetClipboard.pm
Index: WebGUI/AssetClipboard.pm
===================================================================
--- WebGUI/AssetClipboard.pm    (revision 7438)
+++ WebGUI/AssetClipboard.pm    (working copy)
@@ -90,6 +90,17 @@
         $self->session->db->write("insert into metaData_values (fieldId, assetId, value) values (?, ?, ?)", [$h->{fieldId}, $newAsset->getId, $h->{value}]);
     }

+    # Duplicate keywords
+    my $k = WebGUI::Keyword->new( $self->session );
+    my $keywords    = $k->getKeywordsForAsset( {
+        asset       => $self,
+        asArrayRef  => 1,
+    } );
+    $k->setKeywordsForAsset( {
+        asset       => $newAsset,
+        keywords    => $keywords,
+    } );
+
     return $newAsset;
 }
[/code]

Solution Summary
Fixed in 7.5.26, 7.6.1.
Comments
Graham
0
10/9/2008 9:42 am
Fixed in 7.5.26, 7.6.1.
Details
Ticket Status Resolved  
Rating0.0 
Submitted Bymartink 
Date Submitted2008-10-08 
Assigned To Graham  
Date Assigned2008-10-08 
Assigned ByGraham 
Severity Critical (mostly not working)  
What's the bug in? WebGUI Stable  
WebGUI / WRE Version 7.5  
URLbugs/tracker/8776
Keywords
Ticket History
10/9/2008
9:42 AM
Resolved Graham
10/8/2008
2:23 PM
Assigned to Graham Graham
10/8/2008
9:38 AM
Ticket created martink
© 2010 Plain Black Corporation | All Rights Reserved