Skip to content

Commit

Permalink
MID-9501 missing prefix fix in bulk action
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Mar 4, 2024
1 parent adffc0d commit 0b68d93
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,13 @@ private void createSearch(Element extension, GeneratorOptions options, Batch bat

try {
Element originalQuery = DOMUtil.parseDocument(options.getOriginalQuery()).getDocumentElement();
DOMUtil.listChildElements(originalQuery).forEach(e -> objectQuery.appendChild(objectQuery.getOwnerDocument().adoptNode(e)));
DOMUtil.listChildElements(originalQuery)
.forEach(e -> objectQuery.appendChild(objectQuery.getOwnerDocument().adoptNode(e)));

DOMUtil.getAllVisibleNamespaceDeclarations(originalQuery).forEach((k, v) -> {
DOMUtil.lookupOrCreateNamespaceDeclaration(
objectQuery, v, k, objectQuery.getOwnerDocument().getDocumentElement(), false);
});
} catch (RuntimeException e) {
MidPointUtils.publishExceptionNotification(project, null, BulkActionGenerator.class,
GeneratorTask.NOTIFICATION_KEY, "Couldn't parse XML query", e);
Expand Down

0 comments on commit 0b68d93

Please sign in to comment.