Fixes : filters (issues and documents)

Fixes js trouble.
Add custom query filter edit.
Set query creation more generic