How do I access the java DateTool in a User Macro?

Does anyone know how to load java libraries/tools into Confluence User Macros?

I need to use the DateTool()

Thanks

3 answers

1 accepted

So I have had to write a plugin to solve my solution. User Macros are great, but do lack the flexibility to include java modules.

From my research I was not able to find any macro/plugin or guide that match the criterea you want :(.

I believe you might need to develop your own plugin to do that.

What is your use case for needing DateTool specifically?

Hi Daniel,

I want a macro that compares the last edit timestamp of a linked page, with the users recent history of the same page. If the page has been updated since the user last viewed it, then the macro will highlight the link to show it has new content not viewed by the current user.

Chris,

It seems like you are trying to notify users that specific page has been modified since a user edited it last.

Would having a user subscribe to a page and then getting email notifications as well as notifications in the notifications box fulfil this need, or does the use case necessitate that text be highlighted on the page itself.

I am just trying to walk you through some of the default behavior of Confluence before you build something on your own. Maintianing your own plugin can be a giant pain.

Daniel,

Yes that is close to what I want, but the pitfall here is mandating that users subscribe/watch the page and remain subscribed (as they can always stop watching the page if they get sick of emails etc). Since we have staff all over the world, and tracking new staff and ensuring they subscribe can be a bigger challenge.

I was wanting a more descrete method of notifications that did not use emails and does not rely on them "doing" something (ie. subscribing/watching pages).

I have written User Macros, but never any plugins, this is new territory for me, so if I can avoid doing that, all the better.

Thanks

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,600 views 25 10
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you