Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Create postfunction to automatically link to Confluence page

Cedric_DEVAUX
Contributor
October 5, 2015

Hi,

My customer wants to have an automatically link to a specific Confluence page depending to JIRA Component.

For example:

  • user selects the component "Component A" and JIRA links to confluence page (procedure) concerning the component A
  • user selects the component "Component B" and JIRA links to confluence page (procedure) concerning the component B
  • etc.

I imagine to use a postfunction to automatically link to confluence page but I don't find post-function concerning Confluence page only issue linking

I search in JJUPIN postfunction and no action to link to confluence page. I find only "issuelink" and this function seems to be link only issues.

 

Someone could help me?

 

Thank you

1 answer

0 votes
Nic Brough -Adaptavist-
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 Leaders.
October 6, 2015

I don't think Jjupin handles those types of link yet.  I'd use the Script Runner to do it, because I know it can.  Or possibly a variant where you use a scripted field to render an extra field with the url based on <confluence>+<component>

Cedric_DEVAUX
Contributor
October 6, 2015

How did you do with scrip runner? Could you show me an example? Thanks a lot

Nic Brough -Adaptavist-
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 Leaders.
October 10, 2015

I've not done it directly, I just know you can do it because I've done bits of it in the past or come close enough. Script runner can read/write links of all types (I was looking for Epic links when I found that), so the creation shouldn't be too hard, and obviously you can get the array of components on the issue to iterate over and look for your components Note that you'll need to think about how to handle the cases when a user selects A and B - I guess you'd create more than one link (and that's probably easiest to code for) Have a look through https://scriptrunner.adaptavist.com/latest/jira/quickstart.html - there's loads of examples and help in there, they should help you understand and write the script you need.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Upcoming Jira Events