The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make the output of a user macro visible in the search?

Brett Miller
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 5, 2016

I have a user macro that creates a unique document reference, but when I search for documents using the generated reference they do not appear. Am I missing something?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
May 5, 2016

The search does not search the visible results of all macro outputs on the page, but instead it searches only the same text that would be available in the editor.

If you want it to be able to be searchable, then I would recommend making a part of your user macro create an invisible div (can be done with class="hidden") and save it to the end of the page. Something like this:

<div class="hidden">your-document-reference</div>

Your user macro can search if the hidden div exists, and only if it doesn't exist, then it will create one (that way it doesn't create a new div and page save every single time).  Because it is then saved in the storage format, it should show up in the search.

TAGS
AUG Leaders

Atlassian Community Events