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.
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.
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.
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.
Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond. A long time favorite, Team Cale...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events