How to set component from current confluence page name in issue collector?

I have a Confluence space each of whose pages has a "component" of the same name in a corresponding JIRA project.

I have deployed an issue collector in the footer of the space so it appears on every page of the space.

I would like to set the component of an issue created using this issue collection to be the name of the current page.

Is there a way to perform this?


1 answer

1 accepted

0 votes
Accepted answer

I don't think this is currently possible to do.  I will try to explain why that is here. 

So our documentation on the Advance use of the Jira issue collector does explain in some detail how you can set field values in the issue collector trigger itself.   It does not explicitly tell you how to set components though.    As other community users have discovered in threads such as:


Components cannot be set by their name when using an issue collector like this to specify values, such as 'componentA' or 'componentB'.  Instead, you have to set these based off their internal component ID number (these are usually 5 digit numbers that typically start at 10000 or 10100 and tend to be sequential in the order the component was created).

The hurdle that I can't seem to find a way to get over here is translating the component's name into the component's ID number from within Confluence.  If you could specify the component value by the actual name of the component, then perhaps there is some kind of javascript code that could be hacked out in order to pass that into the collector.  But since component requires an ID number, and Confluence does not really have a means to know or store that ID value, I can't seem to find a way to do this either.

If you knew the ID ahead of time, you could certainly configure the trigger code accordingly on each space, but I'm guessing this would be really tedious to do if you have a lot of components in Jira.   I suspect you are looking for a single bit of trigger code to place on each confluence page that is same so that you don't have to try to create/manage different code for different spaces.

Of course I welcome any other thoughts on how this might be accomplished.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 13, 2019 in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

599 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you