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

How to update confluence page with nicely looking JIRA links by "confluence.update_page" in python

Szymon Kołodziej April 20, 2022

Hello there, I'm using python and update_page() function to post some html. Using something like:

<p>https://example.atlassian.net/browse/EXA-123</p>

will be plain text, however is it possible to reach an output like the one on attachment?
This view is being done automatically when i copy-paste JIRA link manually, however I've no idea how to reach it with html.

13123.png

2 answers

1 accepted

0 votes
Answer accepted
Szymon Kołodziej April 22, 2022
'<p><a href="{url}" data-card-appearance="inline" class="external-link" rel="nofollow">"{url}"</a></p>'

working html format ;p

0 votes
Dominic Lagger
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.
April 21, 2022

Hi @Szymon Kołodziej 

I would suggest you not using HTML, instead use the storage format of confluence. 

Then you will notice, that a jira issue is like so: 

<ac:structured-macro ac:name="jira"
ac:schema-version="1"
ac:macro-id="1e82e54a-c515-4a93-b86f-d4b3a83427ce">
<ac:parameter ac:name="server">Jira</ac:parameter>
<ac:parameter ac:name="columnIds">issuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution</ac:parameter>
<ac:parameter ac:name="columns">key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution</ac:parameter>
<ac:parameter ac:name="serverId">ff94f833-c264-3d1f-a236-7bdb5d13106c</ac:parameter>
<ac:parameter ac:name="key">JIRA KEY</ac:parameter>
</ac:structured-macro>

Regards, Dominic

Szymon Kołodziej April 22, 2022

I found option with html :p since your solution returned me some error.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events