Skip to content

Commit c5d3229

Browse files
committed
feat: #8 Add confluence space and page search by 'title starts with'.
1 parent 3100feb commit c5d3229

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

plugins/confluence/src/main/java/com/github/vogoltsov/vp/plugins/confluence/client/ConfluencePageRepository.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ public List<Page> findBySpaceKeyAndText(String spaceKey, String text) {
2929
cql.and(CQL.eq("space.key", spaceKey));
3030
}
3131
if (text != null && !text.isEmpty()) {
32-
cql.and(CQL.like("title", text));
32+
cql.and(CQL.or(
33+
CQL.like("title", text),
34+
CQL.like("title", text + "*")
35+
));
3336
}
3437
cql.orderBy("title");
3538
return search(cql);

plugins/confluence/src/main/java/com/github/vogoltsov/vp/plugins/confluence/client/ConfluenceSpaceRepository.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public List<Space> search(String text) {
3030
if (text != null && !text.isEmpty()) {
3131
cql.and(CQL.or(
3232
CQL.like("space", text),
33+
CQL.like("space", text + "*"),
3334
CQL.eq("space.key", text)
3435
));
3536
}

0 commit comments

Comments
 (0)