Description
How to globally search and modify content describes how to change page content. This describes how to make global changes to comments. On 5.3, this can be done without scripting. This page will show you the techniques for how this can be done.
...
- Confluence 5.7 and above
- CLI 5.3 or above
Details
- We use 2 levels of run actions to get all the comments for all the page found by the CQL query. We use the @commentBody@ special value to indicate that we want the find replace logic to be applied to the existing comment body to set the updated comment. Note that @commentBody@ must be the only text in the comment parameter.
- We use the findReplace parameter in this simple case. You can also use the findReplaceRegex parameter similarly for more complex cases.
Code Block | ||||
---|---|---|---|---|
| ||||
--action runFromIssueListrunFromContentList --jqlcql "projectspace in (JCLI)" --common "-a runFromCommentList --issue @issue@= ACLI and type = comment" --common \"-a-action updateComment --issue @issue@ --id @commentId@@contentId@ --comment @commentBody@@contentBody@ --findReplace \"\"old.examplegear.com:new.examplegear.com\"\" \" " |
...