chakatodd/rt-extension-assettracker — Issue #21: Searching for Links doesn't work
Author: JvdW
Created: 2011-12-01 15:00:42+00:00
State: open

I just tried to do a search using ComponentOf but it doesn't work.
Looking at the sql that ends up in the database I can see why it wouldn't work but I can't figure out how to fix it.
The same search type works correctly for tickets but not for Assets.

/* Formatted on 1-12-2011 15:49:10 (QP5 v5.163.1008.3004) */
SELECT COUNT (DISTINCT main.id)
FROM AT_Assets main JOIN Links Links_1 ON (Links_1.LocalBase = main.URI)
WHERE ( (Links_1.TYPE = 'ComponentOf' AND Links_1.LocalTarget = '1321'))

Problem area is main.URI which isn't a number but a string at://example.com/asset/1321