PL-9880 "Save as" action should not set the "global default" field to the new filter entity

This commit is contained in:
Maxim Gorbunkov 2017-12-04 16:39:43 +04:00
parent d636ce2558
commit 7dd7acaca6

View File

@ -2176,6 +2176,7 @@ public class FilterDelegateImpl implements FilterDelegate {
metadata.getTools().copy(filterEntity, newFilterEntity);
newFilterEntity.setCode(null);
newFilterEntity.setId(UuidProvider.createUuid());
newFilterEntity.setGlobalDefault(false);
//if filter was global but current user cannot create global filter then new filter
//will be connected with current user
if (newFilterEntity.getUser() == null && !uerCanEditGlobalFilter()) {