It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Include last modified date and user in Page Properties Report

MarkC Oct 07, 2013

Is there a way, or a workaround, that will allow me to include the following two items in the Page Properties Report macro?

  • Last Date Modified - The last date when the page was modified
  • Last User to Modify - The name of the last user who modified the content

I realize they could manually type it into the page properties, but that just isn't feasible when the information is already on the page. Can this be pulled in?

1 answer

1 accepted

8 votes
Answer accepted
MarkC Oct 08, 2013

Well, I just went ahead and created my own user macros to solve the problem. For anyone interested, the two macros below do nothing more than display the date and the name of the user who last modified the page on which the macro has been placed.

Last Date Modified

$action.dateFormatter.formatDateTime($content.getLastModificationDate())

Last User Modified

#usernameLink($content.getLastModifierName())


MarkC Oct 10, 2013

Unfortunately, the above didn't work quite as planned. The macro is placed in the page properties macro, but when it is pulled into another page using the Page Properties Report macro, my macro above is pulling in that page's last mod user and date rather than the page on which it was placed.

Any ideas?

MarkC May 14, 2015

It's been a long time, but after an update to Confluence 5.5, the above now works.

Linh Nguyen Sep 21, 2016

How do I put/apply those your macros into my confluence page?

 

Katie Milham Sep 22, 2016

Thank you.  I'd love to know how to implement this as well...

Chad Barnes Oct 28, 2016

Linh and Katie,

You have to write/create these macros via the macro editor in the system administrator UI.

https://confluence.atlassian.com/doc/writing-user-macros-4485.html

Chad Barnes Oct 28, 2016

For instance:

 

## Macro title: My Macro
## Macro has a body: N
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: My Name
## Date created: dd/mm/yyyy
## Installed by: My Name
## This is an example macro
## @noparams
#usernameLink($content.getLastModifierName())
Like Thu Nguyen likes this
Bonnie Gier Nov 15, 2016

@chad barnes Could you share the exact macro info for the last modified date?  I tried using the user macro, but was unsuccessful.

Chad Barnes Nov 16, 2016
  • Visibility: Visible to all
  • Categories: Confluence content
  • Body processing: No macro body
  • Template: (use the code above)

Really, the only two important things are the "No macro body" and the code I provided.

Also, realize that after saving the macro it will take a little time (few seconds) for it to appear in the macro browser. And, you may have to refresh the whole page and re-enter the page editor to get the updated macro browser.

Like NancyB455 likes this
Chad Barnes Nov 16, 2016

2016-11-16_6-36-41.png

Agatha Lai Feb 15, 2018

Does anyone know if there is a way to do this in Confluence Cloud?

Sergio Ruiz Apr 30, 2018

Hi Agatha... If you have it available try inserting a Report Info macro and enter the following in the key field: content:modification date.

In the format field you can play with the way that date is displayed.

I hope it works for you!

NancyB455 May 09, 2019

Exactly what I was looking for.  Can't wait to try it!

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

920 views 7 17
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you