Structure: How to use an image as wiki markup in a column?

Jochen Berdi
Contributor
June 10, 2021

we want to display a traffic light in a column on an IF condition. The three traffic lights (red, green, yellow) are located as an jpg image on a public Confluence page.

Example of a condition for a traffic light:

IF(itemtype = 'folder' and search("Error (New)"; summary) and issue = 0;

Link to the corresponding traffic light:
https://confluence.example.com/download/attachments/125151914/trafficrot.jpg?api=v2

or

https://confluence.example.com/download/attachments/125151914/trafficrot.jpg

How do I make it show the image and not the link to the image? Thanks.

3 answers

2 accepted

Suggest an answer

Log in or Sign up to answer
1 vote
Answer accepted
Nicholas Ellis _ALM Works_
Atlassian Partner
June 10, 2021

Hi Jochen,

EDIT: Unfortunately this does not work anymore.  This relies on the underlying Jira markup, which was updated, and no longer supports images.  This answer has more info https://community.atlassian.com/t5/Jira-questions/How-to-embed-images-by-URL-in-new-Markdown-Jira-editor/qaq-p/1126329

Original answer for old Jira markup:

You can include an image in wiki markup.  The syntax is like this:

![some alt text](http://www.example.com/path/image.jpg)

 For other related information about wiki markup you can check the documentation here https://www.markdownguide.org/basic-syntax

Cheers,
Nick
[ALM Works]

Jochen Berdi
Contributor
June 10, 2021

I can't get it to work in my Structure like this:

 

IF(itemtype = 'folder' and search("Fehler (Neu)"; summary) and issue > 0;![some alt text](http://www.example.com/path/image.jpg); itemtype = 'folder' and search("Ideen (Neu)"; summary) and issue >= 5;"{panel:bgColor=#C70039}{color:white}STAU{color}{panel}"; itemtype = 'folder' and search("Backlog (PRIO)"; summary) and issue > 0;"{panel:bgColor=#ADFF2F}PRIO{panel}"; itemtype = 'folder' and search("Backlog (PRIO)"; summary) and issue >= 10;"{panel:bgColor=#C70039}{color:white}PRIO-STAU{color}{panel}")

Nicholas Ellis _ALM Works_
Atlassian Partner
June 10, 2021

Hi Jochen,

All wiki markup is a string to be parsed.  You simply need to quote the value, so this:

![some alt text](http://www.example.com/path/image.jpg)

becomes

"![some alt text](http://www.example.com/path/image.jpg)"

Apologies for not mentioning that.

Also it looks like you are still using my example link.  That does not link to a real image so you will probably want to use your confluence URL instead of example.com to verify this works.

Cheers,
Nick
[ALM Works]

Like Dave Rosenlund _Trundl_ likes this
Jochen Berdi
Contributor
June 10, 2021

sorry, it just does not work. But I am also a real layman and may not understand you correctly.
Try it with column, formula and Wiki markup

IF(itemtype = 'folder' and search("Error (New)"; summary) and issue > 0;"![some alt text](https://confluence.mycompanyname.com/download/attachments/125151914/trafficrot.jpg)")

the resiult in column Ampel:


![some alt text]![some alt text][some alt text](https://confluence.mycompanyname/download/attachments/125151914/trafficrot.jpg)

https is a link and when you run it, the graphic is displayed in a new edge tab...but not in the column...we have structure 6.6

I give up

Jochen Berdi
Contributor
June 11, 2021

Or somebody find my mistake...good luck, thanks

Dave Rosenlund _Trundl_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 11, 2021

Drop us a line at support@almworks.com and reference this thread, @Jochen Berdi.

We’ll get this sorted out.  

-dave 

0 votes
Answer accepted
Jochen Berdi
Contributor
June 15, 2021

Hi

Our problem is probably based on:
https://confluence.atlassian.com/jirakb/image-attachments-are-not-displayed-inline-in-wiki-renderer-fields-723518199.html

And our security does not want to make any adjustments here. Thank you

Dave Rosenlund _Trundl_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 16, 2021

Ah...  Good to know. Thanks for sharing this update with the community, @Jochen Berdi.

-dave 

0 votes
Dave Rosenlund _Trundl_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2021

Hi, @Jochen Berdi. I think it would be easier to help you diagnose the issue if we could take a look at your entire formula. Will you share your formula with us here? 

If you prefer, you can contact the ALM Works support team for assistance via support@almworks.com

-dave [ALM Works]   

Jochen Berdi
Contributor
June 10, 2021

Hi Dave,

we have a column Ampel in our structure (first picture support.jpg). It currently contains the following formula:
IF(itemtype = 'folder' and search("Fehler (Neu)"; summary) and issue > 0;"{panel:bgColor=#C70039}{color:white}BUGS{color}{panel}";itemtype = 'folder' and search("Requirement (New)"; summary) and issue < 5;"{panel:bgColor=#ADFF2F}IDEE{panel}";
itemtype = 'folder' and search("Ideas (New)"; summary) and issue >= 5;"{panel:bgColor=#C70039}{color:white}STAU{color}{panel}";
itemtype = 'folder' and search("Backlog (PRIO)"; summary) and issue > 0;"{panel:bgColor=#ADFF2F}PRIO{panel}";
itemtype = 'folder' and search("Backlog (PRIO)"; summary) and issue >= 10;"{panel:bgColor=#C70039}{color:white}PRIO-STAU{color}{panel}")

The Issue query checks the value in the Issues column (number).

Now we want to replace the part panel by calling an image and I don't know how to do that. The image is on a Confluence page as an attachment and has the link (company address changed to example): https://confluence.example.com/download/attachments/125151914/trafficgreen.gif?api=v2

What must be after the IF conditions, so that the GIF file is displayed. The column Ampel is defined as Wiki Markup...IF(itemtype = 'folder' and search("Error (New)"; summary) and issue > 0; ????here we need help???? Support.JPGtrafficgreen.gif

TAGS
AUG Leaders

Atlassian Community Events