Forums

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

Is there a way to see all of the pages created by a user?

chris mccraw
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 21, 2015

Specifically, created by myself.  I've created hundreds of pages and commented on thousands.  Yes, I am very aware of the normal answer to this existing question: https://answers.atlassian.com/questions/55182 which is to use the content-by-user macro.  That's nice, but it a) includes comments, blog posts, b) won't allow filtering by space, and most importantly cuts off way, way before the end of the list.

Things I've tried beyond that macro:

  • I've tried advanced searching, using myself as author, and space limiting, and limiting the search to pages, which would do what I want - except that I can't search for a word that might actually be in every page i created (eg:  "the" and "a" return no results), and if i try searching for nothing, my search parameters are not obeyed - I see content created by others (I suppose I am an "author" since I fixed spelling or updated a doc that has 200 revisions 150 revisions ago).   I only want to see pages I created.
  • looking at my profile page and selecting 'activity'.  This also fails to allow me to filter by space and limit only to pages that I created, rather than everything I've ever touched.  Also, having to click after every ~20 entries to get more gets tedious quickly when you have thousands of comments and edits.

I've written some cool stuff.  I want to run through it, after 3 years of writing, and look at it.  Is there no reasonable way to do this? I'd be happy to use an API if there were a way to achieve my aims exactly.

1 answer

0 votes
Alex Medved _ConfiForms_
Community Champion
February 21, 2015

Hi Chris!

Developer's approach smile ...

With API you can, https://developer.atlassian.com/confdev/plugin-cookbook/searching-using-the-v2-search-api

The code (quickly prototyped) is something like:

SearchQuery query = BooleanQuery.composeAndQuery(new CreatorQuery("admin"), new ContentTypeQuery(ContentTypeEnum.PAGE));
    SearchSort sort = new ModifiedSort(SearchSort.Order.DESCENDING); // latest modified content first
    SearchFilter securityFilter = SiteSearchPermissionsSearchFilter.getInstance();
    ResultFilter resultFilter = new SubsetResultFilter(2000); // how many you have approx? put larger number here
    Search search = new Search(query, sort, securityFilter, resultFilter);
    final SearchResults searchResults = searchManager.search(search);
    for (SearchResult result : searchResults) {
      String displayTitle = result.getDisplayTitle();
      // ... more result.get here
    }

Regards,

Sash

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events