I'm trying to create a user macro and I need to be able to detect the creator of the page the macro is used on. I know $action.remoteUser.name detects the currently logged in user, but how do i find the user who created the page(or at least last edited it)?
found the answer in another person's question: https://answers.atlassian.com/questions/50237/how-to-get-page-creator/50239
$content.getCreatorName()
After much searching, I found a solution for myself. It works because the intended use is in a personal space which is created by the user who also edited the home page last. Still would like to find one that works on a page level for other uses.
It's simply:
$space.getCreatorName()
I found it on this webpage
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The AbstractPage's getCreatorName() method will return the name of the page. This is how I would access it in a decorator, but in a macro, I can't recall how to get a reference to the current page.
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.