Hi,
I would like to search for pages with labels which are prefix with say characters OTB or otb. For example if page 1 has label OTB_First and page 2 has label otb_second, my search (CQL or Confluence search) for any page starting with OTB or otb, should give me 2 pages or even if give me labels - should give me OTB_First , otb_second
Any ideas?
Thanks,
Suresh
Hi @Suresh Venkat ,
if you have the possibility to run a query against the database, here's your SQL:
SELECT c.title,s.spacename,l.name as label
FROM content c
JOIN spaces s ON s.spaceid = c.spaceid
JOIN content_label cl ON cl.contentid = c.contentid
JOIN label l ON l.labelid = cl.labelid
WHERE l.name LIKE 'otb%'
AND c.contenttype = 'PAGE'
AND c.prevver IS NULL;
@Nicolai Sibler : We are looking at how to display it on a page. Is there anyway, we can fire this query from a confluence page - may be via an REST/Macro. Do you know? Thanks for the query though.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Complementary to what Kishan said, you might also have a look at some Plugins. (I have no experience with any of them tbh.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Suresh Venkat If you have access to the database, the easiest way to find this information is through the database. (Make sure you have a backup of your database before performing any SQL query.) Refer this link on a sample query which you can modify as per your needs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Kishan Sharma : As you can see, we are looking to search and display on a page via a Macro or CQL. Any help can be provided will be appreciated
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As Brant mentioned, wildcard search for labels is not possible through the user interface currently. Either, you can export the query output from the database, and attach it to the confluence page or create a page using REST API and provide the exported output from the db query as an input (in json format) to the rest call.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Suresh Venkat There is not a wildcard search for labels available in Confluence or Jira. I was able to find an enhancement request for Jira but not for Confluence. I would suggest submitting one here. https://jira.atlassian.com/secure/Dashboard.jspa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Brant Schroeder : Thanks for the inputs. Can you please point us to the Enhancement that you have put in for Jira. We want to see, if it matches to our case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Suresh Venkat The enhancement request I was able to find for Jira is here: https://jira.atlassian.com/browse/JRASERVER-23038
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot @Brant Schroeder . I have submitted https://jira.atlassian.com/browse/CONFSERVER-73979
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.