Closed matt454357 closed 9 years ago
I can't tell what isn't matching from the results. Are some of the results not actually checked out to you? Or do some of them not have the specified property? Or, if all of them have a value for the specified property, do any of the property values not match the requested value?
If I remember correctly, if a property value is text (not numeric, date, or boolean), then a SQL LIKE syntax is used. This might be making the difference if the issue is the latter.
-JB
On Thu, May 21, 2015 at 4:46 PM, Matt Taylor notifications@github.com wrote:
This image shows that, under certain conditions, the search returns results that don't actually match (assuming AND connections between criteria).
- Property contains specified
- Checked Out to Me box is checked
[image: image] https://cloud.githubusercontent.com/assets/7604932/7760406/964810e8-ffd8-11e4-865d-6e1bcb6d77df.png
@briggsj3 https://github.com/briggsj3, Do you have time to work on it? I probably won't get to it until tomorrow.
— Reply to this email directly or view it on GitHub https://github.com/brenkmanco/hackpdm/issues/12.
Search criteria:
In the results, you can see a file named SWBrowser.mdb. In the main window, you can see that SWBrowser.mdb has no properties assigned at all.
I would expect the query to come out something like this:
WHERE e.checkout_user=1003
AND vp.prop_id=9876
AND vp.text_value ILIKE '%X0%'
Maybe it has an OR somewhere?
I tried searching without "Checked Out to Me" = true. I got an error, but I believe this is from a different issue.
Okay. It looks like these two errors are related. We seem to be missing the property id, like this:
AND vp.prop_id=9876
Or, we could do this:
LEFT JOIN hp_property ON hp_property AS p ON p.prop_id=vp.prop_id
...
AND p.prop_name='PartNum'
I found that same issue a few minutes ago and am fixing it now. Will push shortly. -JB
On Fri, May 22, 2015 at 9:39 AM, Matt Taylor notifications@github.com wrote:
Okay. It looks like these two errors are related. We seem to be missing the property id, like this:
AND vp.prop_id=9876
Or, we could do this:
LEFT JOIN hp_property ON hp_property AS p ON p.prop_id=vp.prop_id ...AND p.prop_name='PartNum'
— Reply to this email directly or view it on GitHub https://github.com/brenkmanco/hackpdm/issues/12#issuecomment-104694001.
This image shows that, under certain conditions, the search returns results that don't actually match (assuming AND connections between criteria).
@briggsj3, Do you have time to work on it? I probably won't get to it until tomorrow.