Skip to content

Commit

Permalink
containerable list panel - search filter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Jul 3, 2019
1 parent 642fd17 commit 0d3504a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Expand Up @@ -184,10 +184,14 @@ protected Collection<SelectorOptions<GetOperationOptions>> getQueryOptions() {
protected abstract <PS extends PageStorage> PS getPageStorage();

private ObjectQuery createQuery() throws SchemaException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException, SecurityViolationException {
ObjectQuery query = getPrismContext().queryFor(getType())
.build();
Search search = searchModel.getObject();
ObjectQuery query = search != null ? search.createObjectQuery(getPageBase().getPrismContext()) :
getPrismContext().queryFor(getType()).build();
ObjectFilter customFilter = getCustomFilter();
if (customFilter != null){
if (query == null){
query = getPrismContext().queryFor(getType()).build();
}
query.addFilter(customFilter);
}
return query;
Expand Down
Expand Up @@ -135,10 +135,21 @@ public class SearchFactory {
SEARCHABLE_OBJECTS.put(CaseWorkItemType.class, Arrays.asList(
ItemPath.create(CaseWorkItemType.F_ASSIGNEE_REF),
ItemPath.create(CaseWorkItemType.F_ORIGINAL_ASSIGNEE_REF),
// ItemPath.create(PrismConstants.T_PARENT, CaseType.F_STATE),
ItemPath.create(PrismConstants.T_PARENT, CaseType.F_STATE),
ItemPath.create(PrismConstants.T_PARENT, CaseType.F_OBJECT_REF),
ItemPath.create(CaseWorkItemType.F_PERFORMER_REF)
));

SEARCHABLE_OBJECTS.put(CaseType.class, Arrays.asList(
ItemPath.create(CaseType.F_STATE),
ItemPath.create(CaseType.F_STAGE_NUMBER),
ItemPath.create(CaseType.F_PARENT_REF),
ItemPath.create(CaseType.F_REQUESTOR_REF),
ItemPath.create(CaseType.F_TARGET_REF),
ItemPath.create(CaseType.F_TASK_REF),
ItemPath.create(CaseType.F_OBJECT_REF)
));

SEARCHABLE_OBJECTS.put(ObjectPolicyConfigurationType.class, Arrays.asList(
ItemPath.create(ObjectPolicyConfigurationType.F_SUBTYPE),
ItemPath.create(ObjectPolicyConfigurationType.F_OBJECT_TEMPLATE_REF)
Expand Down

0 comments on commit 0d3504a

Please sign in to comment.