Get deleted date for a page in trash

aas
Contributor
October 10, 2023

Hello!

I need help. I found this article https://confluence.atlassian.com/confkb/how-to-find-the-deleted-date-for-a-page-in-trash-1155479219.html

But I have an empty table AO_7B47A5_EVENT

Where can I find delete date of items in trash?

Is it possible to get this date using Java API via scriptrunner or only through the database?

Confluence version 7.13.11

Thanks in advance I hope somebody can help!

1 answer

0 votes
Helmy Ibrahim _Adaptavist_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 9, 2023

Hi @aas,

Looking at the Confluence 7.13.11 Java API documentation, I don't think there is a way to retrieve the page's deleted date & time via Java API.

However, you can do so in Confluence 7.14.0 and above with the new addition of the getTrashDate method in the API.

import com.atlassian.confluence.spaces.SpaceManager
import com.atlassian.confluence.pages.TrashManager
import com.atlassian.sal.api.component.ComponentLocator

def trashManager = ComponentLocator.getComponent(TrashManager)
def spaceManager = ComponentLocator.getComponent(SpaceManager)

// Replace with your space key
def space = spaceManager.getSpace('TEST')

// Adjust the min/max results you want
def deletedPages = trashManager.getTrashContents(space, 0, 100)

deletedPages.each { page ->
log.warn "The page ${page.title}(${page.id}) deleted on ${page.trashDate.get()}"
}
Perhaps you can upgrade to 7.14.0 and above, and the script would work for the deleted pages pre-update?

Kind Regards,
Helmy

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events