Steps to reproduce
1. Got to Product Window and hit Look up button
2. Create new Filtered named Active, Add Active = Yes
3. Click on Save button. It will create new filter named Active
4. Now click on Share button
5. Now click on save button.
6. Check Named filter drop down and you see 2 filter named Active.
As I mentioned in the pull request. Setting AD_User_ID = 0 for global queries would be a mistake since System is an existing and valid user in iDempiere and can have its own saved queries. That’s why the global queries were designed to set AD_User_ID = NULL.
I’ve created a new pull request, it addresses the problem described here plus a new one found while developing. The commit changes:
If a user query is shared globally the saved button is disabled to avoid creating a private duplicate.
A user can make a copy of the global query and save it privately. A copy is made by changing the name of the saved query in the corresponding field in the search window. This also prevents having multiple queries with the same name.
There was a bug when updating a global query. When you selected a shared query, modified it, and click on the share button, it was duplicated instead of updated. This has been fixed as well.
Pull request →
, I think your changes are perfect.