Skip to content

Commit

Permalink
MID-4271 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Dec 4, 2017
1 parent 4a23803 commit 54bbda7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Expand Up @@ -958,7 +958,8 @@ public static <C extends Containerable> String getDisplayName(PrismContainerValu
}
if (containerable instanceof AbstractPolicyConstraintType){
AbstractPolicyConstraintType constraint = (AbstractPolicyConstraintType) containerable;
String displayName = (StringUtils.isEmpty(constraint.getName()) ? (constraint.asPrismContainerValue().getPath().last()) : constraint.getName())
String displayName = (StringUtils.isEmpty(constraint.getName()) ? (constraint.asPrismContainerValue().getParent().getPath().last())
: constraint.getName())
+ (StringUtils.isEmpty(constraint.getDescription()) ? "" : (" - " + constraint.getDescription()));
return displayName;
}
Expand Down
Expand Up @@ -229,14 +229,13 @@ protected int getItemsPerPage() {

protected ObjectQuery createObjectQuery() {
QName relation = getRelation();
S_AtomicFilterExit tempFilter = QueryBuilder.queryFor(AssignmentType.class, getParentPage().getPrismContext())
.block()
.not()
.item(new ItemPath(AssignmentType.F_CONSTRUCTION, ConstructionType.F_RESOURCE_REF))
.isNull()
.endBlock();
if (PrismConstants.Q_ANY.equals(relation)){
return tempFilter
return QueryBuilder.queryFor(AssignmentType.class, getParentPage().getPrismContext())
.block()
.not()
.item(new ItemPath(AssignmentType.F_CONSTRUCTION, ConstructionType.F_RESOURCE_REF))
.isNull()
.endBlock()
.or()
.block()
.not()
Expand All @@ -245,8 +244,7 @@ protected ObjectQuery createObjectQuery() {
.endBlock()
.build();
} else {
return tempFilter
.or()
return QueryBuilder.queryFor(AssignmentType.class, getParentPage().getPrismContext())
.item(new ItemPath(AssignmentType.F_TARGET_REF))
.ref(relation)
.build();
Expand Down

0 comments on commit 54bbda7

Please sign in to comment.