Skip to content

Commit

Permalink
fixing assignment details panel query for abstractRole + resource ass…
Browse files Browse the repository at this point in the history
…ignments
  • Loading branch information
katkav committed Sep 22, 2017
1 parent cb296a0 commit aba7b66
Showing 1 changed file with 10 additions and 2 deletions.
Expand Up @@ -57,6 +57,7 @@
import com.evolveum.midpoint.web.session.UserProfileStorage;
import com.evolveum.midpoint.web.session.UserProfileStorage.TableId;
import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ConstructionType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType;

Expand Down Expand Up @@ -278,8 +279,15 @@ protected int getItemsPerPage() {
}

protected ObjectQuery createObjectQuery() {
return QueryBuilder.queryFor(AssignmentType.class, getParentPage().getPrismContext()).item(new ItemPath(AssignmentType.F_TARGET_REF))
.ref(getRelation())
return QueryBuilder.queryFor(AssignmentType.class, getParentPage().getPrismContext())
.block()
.not()
.item(new ItemPath(AssignmentType.F_CONSTRUCTION, ConstructionType.F_RESOURCE_REF))
.isNull()
.endBlock()
.or()
.item(new ItemPath(AssignmentType.F_TARGET_REF))
.ref(getRelation())
.build();
};

Expand Down

0 comments on commit aba7b66

Please sign in to comment.