
no-reply at lighthouseapp
Feb 28, 2011, 1:04 PM
Post #1 of 2
(303 views)
Permalink
|
|
[Bricolage #242] Simple Search checks previous versions of an asset
|
|
// Add your reply above here ================================================== Nick Legg updated this ticket at February 28th, 2011 @ 09:03 PM I recently moved a few assets from one category to another. When using Simple Search on the old category, the recently relocated assets still show up even though they have been successfully moved. The query sent to my database is this: SELECT mt.id, mt.uuid, mt.element_type__id, mt.priority, mt.source__id, mt.current_version, mt.published_version, mt.usr__id, mt.first_publish_date, mt.publish_date, mt.expire_date, mt.workflow__id, mt.desk__id, mt.publish_status, mt.active, mt.site__id, mt.alias_id, i.id, i.name, i.description, i.media__id, i.usr__id, i.version, i.media_type__id, i.primary_oc__id, i.category__id, i.file_size, i.file_name, i.location, i.uri, i.cover_date, i.note, i.checked_out, e.biz_class__id, group_concat( DISTINCT m.grp__id ), group_concat( DISTINCT c.asset_grp_id ), group_concat( DISTINCT w.asset_grp_id ) FROM media_instance i, media_member mm, member m, element_type e, category c, workflow w,media mt WHERE mt.id = i.media__id AND mm.object_id = mt.id AND m.id = mm.member__id AND m.active = '1' AND c.id = i.category__id AND e.id = mt.element_type__id AND mt.workflow__id = w.id AND mt.current_version = i.version AND i.checked_out = ( SELECT checked_out FROM media_instance WHERE version = i.version AND media__id = i.media__id ORDER BY checked_out DESC LIMIT 1 ) AND mt.id IN (SELECT mmt.id FROM media mmt JOIN media_instance mi2 ON media__id = mmt.id WHERE LOWER(mi2.name) LIKE LOWER('%/pressreleases/commencement/%') OR LOWER(mi2.uri) LIKE LOWER('%/pressreleases/commencement/%') UNION SELECT media_id FROM media_keyword JOIN keyword kk ON (kk.id = keyword_id) WHERE LOWER(kk.name) LIKE LOWER('%/pressreleases/commencement/%')) AND mt.active = 't' AND mt.site__id = '100' GROUP BY mt.id, mt.uuid, mt.element_type__id, mt.priority, mt.source__id, mt.current_version, mt.published_version, mt.usr__id, mt.first_publish_date, mt.publish_date, mt.expire_date, mt.workflow__id, mt.desk__id, mt.publish_status, mt.active, mt.site__id, mt.alias_id, i.id, i.name, i.description, i.media__id, i.usr__id, i.version, i.media_type__id, i.primary_oc__id, i.category__id, i.file_size, i.file_name, i.location, i.uri, i.cover_date, i.note, i.checked_out, e.biz_class__id ORDER BY i.cover_date, mt.id It looks like media_instance mi2 is the culprit; it does not appear to be restricted to the current version of the media asset even though media_instance i (earlier in the query) *is* restricted to the current version. This behavior was observed in Bricolage 1.10.9 and 2.0.1. -------------------------------------------------------------------------------- Assigned: Bugs (at bricolage) State: new View this ticket online: http://bricolage.lighthouseapp.com/projects/29601/tickets/242-simple-search-checks-previous-versions-of-an-asset Stop being notified of this ticket's changes: http://bricolage.lighthouseapp.com/projects/29601/tickets/242-simple-search-checks-previous-versions-of-an-asset/watch Update your Profile: http://bricolage.lighthouseapp.com/profile Support: support [at] lighthouseapp or http://help.lighthouseapp.com
|