You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Advanced Search by "Default Location is wrong, in debug mode it's clear that the queries are wrong.
the query is:
select assets.* from assets where assets.assigned_to is not null and assets.deleted_at is null order by name asc limit 50 offset 0
but it should be more like this (the below is the querry for locations, NOT Default Locations):
select assets.* from assets where (exists (select * from locations where assets.location_id = locations.id and locations.name LIKE '%RO Craiova%' and locations.deleted_at is null)) and assets.assigned_to is not null and assets.deleted_at is null order by name asc limit 50 offset 0
Reproduction steps
Go to advanced search, complete advanced location field
press close button
all database is shown without any filter
Expected behavior
The result should be filtered by Default Location
Screenshots
Snipe-IT Version
v6.1.2 build 10938
Operating System
Red Hat
Web Server
Apache
PHP Version
8.1.21
Operating System
Windows 11
Browser
Chrome
Version
115.0.5790.102 (Official Build) (64-bit)
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
No response
Additional context
This is an upgrade.
The text was updated successfully, but these errors were encountered:
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
Debug mode
Describe the bug
Advanced Search by "Default Location is wrong, in debug mode it's clear that the queries are wrong.
the query is:
select
assets
.* fromassets
whereassets
.assigned_to
is not null andassets
.deleted_at
is null order byname
asc limit 50 offset 0but it should be more like this (the below is the querry for locations, NOT Default Locations):
select
assets
.* fromassets
where (exists (select * fromlocations
whereassets
.location_id
=locations
.id
andlocations
.name
LIKE '%RO Craiova%' andlocations
.deleted_at
is null)) andassets
.assigned_to
is not null andassets
.deleted_at
is null order byname
asc limit 50 offset 0Reproduction steps
Expected behavior
The result should be filtered by Default Location
Screenshots
Snipe-IT Version
v6.1.2 build 10938
Operating System
Red Hat
Web Server
Apache
PHP Version
8.1.21
Operating System
Windows 11
Browser
Chrome
Version
115.0.5790.102 (Official Build) (64-bit)
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
No response
Additional context
This is an upgrade.
The text was updated successfully, but these errors were encountered: