Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,076
Community Members
 
Community Events
165
Community Groups

How do I return query results as a comma separated list in SQL?

Edited

Issue: I am using the Jira Issue/Filter macro in a Confluence page. In Jira, there is a list of items selected. I want to have commas or semi commas when I pull it into Confluence. 

For example, currently in Jira there is an External Document field:

Screenshot 2022-04-08 100405.png

Then the table cell in Confluence shows: (note, no commas or anything to separate the list)

Screenshot 2022-04-08 100526.png

 

Question: How do I enter commas or semicolons or something to separate each item?

 

Here is my SQL so far: 

FORMATWIKI(SUM("External: " + 'External Document')) AS 'Resources'

 

 

 

2 answers

Hi @Laurie Huth ,

If I got the case right, in the original table coming from the Jira Issues macro you have a plain row of words without any separations:

|Client Outreach Client Training Tech Letter VBN|

Then you just add the "External:" expression to the beginning with the Table Transformer macro.

The problem is that we don't know where/how to break your original string coming from the Jira Issues macro (by special separators, string length, etc.). Physically it is a row of words with spaces. It is only logically that we understand that a correct variant is

|Client Outreach, Client Training, Tech Letter, VBN|

and not

|Client Outreach Client, Training Tech Letter, VBN|

or smth else.

So, as for now I don't have any ideas. Maybe smth can be done with the original field in Jira so that it will be better displayed in Confluence.

The original field information from Jira (that has comma separators) is from a dropdown list. See images. 

The field as it appears in Jira:

Screenshot 2022-04-08 100405.png

after choosing options from a dropdown menu in Jira:

Screenshot 2022-04-08 130055.png

Jira automatically put commas into the External Document field shown above, as it knew where the separators were originally. Is there a way to have Confluence pull in the content exactly as it is shown in the field (with the commas). I've been trying to think of some clever workarounds...

Thanks!

Unfortunately, I don't have any ideas. The Table Transformer macro won't be of any help because we can't put any splitting logic inside its query.

Maybe you should try to post another question with a different topic (smth regarding "Custom Jira field is poorly displayed in Confluence") and add Jira Issues macro to the hashtags - maybe this question will attract more experienced Jira users. I don't think that your case is unique, maybe there are some workarounds.

@Laurie Huth were you able to find a solution? I am running into the same issue :( 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

142 views 1 3
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you