Is there a way, or a workaround, that will allow me to include the following two items in the Page Properties Report macro?
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?
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())
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's been a long time, but after an update to Confluence 5.5, the above now works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do I put/apply those your macros into my confluence page?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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())
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@chad barnes Could you share the exact macro info for the last modified date? I tried using the user macro, but was unsuccessful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does anyone know if there is a way to do this in Confluence Cloud?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for posting this--just what I needed!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can anyone help me find the 'Report Info' macro, I cannot see this as a macro to add.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I tried with following code, but it will display current users last modified date.
$action.dateFormatter.formatDateTime($content.getLastModificationDate())
Could you please some one help, how to display list of users last modified date.
Thanks in advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For our Confluence instance (7.19) below user macro stopped working which was working on earlier datacenter version 7.13. Any advise on how to fix this?
Last User Modified
#usernameLink($content.getLastModifierName())
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian restricted the variables in the User Macro Velocity context, see here https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity/#user-macro-velocity-context
You have to add the following variables:
-Dmacro.required.velocity.context.keys=action,htmlUtil,permissionHelper,req
You can find out this by yourself by searching the Confluence source code for the Velocity macro #usernameLink and watch out for the used variables:
macros-deprecated.vm
#macro (usernameLink $username) [...]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.