Hello everyone,
My goal is to display the value of a Jira REST query result into a confluence page, inline with the text. I am aware of the /jira macro but that does not cut it as it renders ugly gray boxes that break the line.
Here an example of what I'd like to see in confluence and how in my head i'd like to get it done:
In my confluence page I've the following sentence as normal text:
The way i dream for this to work is:
Now this would get me the value of the field id: 123456 from the REST api for project PRJ-1 and display it as text in confluence.
What i don't want:
Any direction is appreciated since i am new here and i am losing my mind around macros and other articulated concepts. Just some simple JSON parsing, HTLM, CSS or running some JS/Python somewhere would relieve my stress.
Thanks
The out-of-the box Jira macro for Confluence returns values in tabular format. You're going to need something like ScriptRunner do to the REST based lookup behind the scenes and return some raw text that you can put on the page.
Alternatively, third party tools like the Stiltsoft Table Filters can manipulate the heck out of the data returned by the Jira macro and format it in all sorts of way on the Confluence page.
Hello,
I appreciate you taking the time to respond. Table filters seems to be doing just tables (as the name suggests) which is not very useful, unless you want to display data...in a table.
I've inquired Script Runner support, although from their description while it is evident you can query the Jira Api, it is unclear how much you can manipulate and display on confluence.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, the output from the Stiltsoft Table filter will still be a table, but if you render the table with no borders, cell padding or colours, nobody will know it's there, all they'll see is the text. The table becomes an invisible container for the text, so it's the simplest solution. Still, in HTML, tables aren't truly inline with text
If you absolutely need the output in that table as text, inline in the page body, you might have to do some browser side page content manipulation with something like JQuery to 'unwrap' the content from the table and put it back in the same place.
The last resort would be to use ScriptRunner to get the value you want, but you'd have to write your own Confluence macro to take that value, put it inside the text, then render it on the page... but then you face a similar issue; macros get treated as separate objects on the page and can't just be inserted inline in any text, anywhere.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Want to leave your mark on Confluence? One winner will have their whiteboard design added into Confluence for all users to access! This is your chance to showcase your creativity, help others, and gain recognition in the Confluence community.
Share your template today!Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.