Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Find Favorite Spaces in Confluence via CQL

Admin User November 20, 2018

Hello,

I want to use a CQL Query to find all favorite spaces for the currentUser in Confluence. Do someone has an idea how to do that?

To find all favorite pages it is easy

favourite = currentUser() 

But I need this for Spaces.

We are using Confluence 6.12.2 and have Scriptrunner for Confluence installed (5.4.36).

Thanks 

Katrin

2 answers

2 accepted

1 vote
Answer accepted
Admin User November 26, 2018

Hi Shannon,

Thanks for your answer. I need this for the navigation bar with the subspace plugin. There I want an entry for personal spaces. 

I've found an other easy way to show all favorite spaces for the logged in user:

space.type = favorite and type = space

This works perfect.

Cheers

Katrin

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 26, 2018

Katrin,

Happy to hear you were able to resolve the issue in the add-on!

Thank you for letting us know how you did it.

Take care, and have a nice week.

Regards,

Shannon

0 votes
Answer accepted
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 23, 2018

Hi Katrin,

What are you going to be using this for? I believe you could do this with a SQL query instead.

You would want to combine How to list the users favourite pages and spaces but restrict it to a specific user using the method from How to list which spaces a user can access. For example, 

WHERE um.lower_username = '<user_name>'

I'm not a wizard with SQL but I believe this could get the information you need.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events