You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I'm trying to write a bit of code that pulls the @ user mention details from a specific line in the page properties of a particular page.
I'm using the PagePropertiesService with getReportFromContent(page) and then getAllMacroInstances().
I can then iterate through list returned by getAllMacroInstances(). I can locate the page property am looking for BUT getDetailStorageFormat() returns a blank string.
If I use a page property that is just a string typed into the page rather than a macro I get the expected text. It appears that getDetailStorageFormat() does not work when there is a macro involved.
It also appears that the PagePropertiesService is an undocumented API.
I borrowed quite a bit of code from here:
Has anyone else tried this?
I'm not 100% sure what you were going for with your approach to the macros, but you can search the body of a given page for an @ mention with this script
@-mentions take the form of ri:userkey="8aab818c73caedf00173caf477050000", where the string of characters is the user ID. Therefor if we parse the body of a page for that string, we'll turn up any @-mentions in the system.
Worth noting is the fact that while you can return the body of a page without the wiki markup, it doesn't include the @. So you'd just be searching for the name of the user, which is ultimately less specific.
&& page.version == page.latestVersion.version
){
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.