I need help finding information for confluence groovy scripting.
When a confluence page is linked to a Jira issue this button shows up on the page
Within Confluence can I use groovy to get the Issue key and summary to display a text field or Jira link macro?
I would like to be able to see the Jira linked issues listed out like the card here when you click the Jira link button above
Thanks
-SJ
Hi @SJ
The only way I found to achieve that is to do a REST Call to get this information.
The endpoint to use from Confluence is "/rest/jira-metadata/1.0/metadata?pageId="
It will return a JSON with "groups", one of them is of type Issues and list all issues linked to the page.
Regards
This might be a bit complicated but you should be able to accomplish this, although I think you need to break down your requirements a bit.
Ex: How are the links being made? re: Jira macro, Confluence Link in Jira Issue, URL copy/paste into Confluence page.
It has been my experience when publishing Jira data into confluence it is easier to push from Jira than to pull from confluence. With that in mind., you'll need to setup a listener, use your application links for access, listen for when new links are created, validate to ensure the links are of type confluence, get the space & page id, formulate your content, publish.
Now on the other side you could create a custom macro/listener combo to pull the data and publish an update based on the first existence or edit of a Jira link, I think the easiest way to do that would be via the scriptrunner plugin and setup a rest endpoint or resource to the jira database to feed into the custom macro.
I have some script examples that could get you going depending on the course of action you wish to take but keep in mind this will not be easy and will have a maintenance overhead.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's a bit more detail
We use AutoPage in Jira to create Confluence documentation pages for specific issue types. That is how the Confluence links are created.
This Icon/button is dynamically rendered at the top of a page if that page is linked to by a Jira Issue and is built in Confluence functionality
I'm looking for a Confluence macro/script to show me all the Jira Issues that reference that Confluence page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't have experience with that plugin, however the documentation shows it's very customizable as to what gets published. Maybe you might want to explore that a bit more if possible, re: maybe a second publish with different details(template) based on the initial publish....
Quick question, do these get published to a singular page? or individual pages? just wondering based on your last sentence. The answers may help with further breaking down requirements.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
(Edited for clarity)
We use autopage to create single doc pages from Jira as well as multipage hierarchies.
How the Confluence pages are created shouldn't make much difference. The fact the page is linked in a Jira issue and somehow a Confluence page knows to display this icon when that link exists.
I want to be able to expand that connection to get and display a bit more information about the Jira issues referencing the confluence page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.