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,363,022
Community Members
 
Community Events
168
Community Groups

Include Confluence username in transformed table

Edited

I have a transformed table and based on CASE scenario we have to add a userid in the column. But we cant use this in the transformed table (SQL query) as it would in the regular table added in confluence 

SELECT CASE WHEN T2.'Labels' LIKE "%Bug%" THEN @userid 

T

2 answers

1 accepted

0 votes
Answer accepted

Hi @Katerina Kovriga _Stiltsoft_ ,

 

Thanks for your response. I'm looking to add the user in the column in tagged form which looks like @Katerina Kovriga with a link to your profile like  https://confluence.abc.com/display/~kkovriga

Oh, I see - unfortunately it can't be done naturally. The @ symbol won't be recognized.

I can suggest the following workaround:

SELECT *,
CASE WHEN T1.'Project' LIKE "%Pr1%"
THEN FORMATWIKI("[Kovriga|" + "https://confluence.stiltsoft.com/display/~kkovriga" + "]")
END
AS 'Person'
FROM T*

Here you create the full link to the required profile manually. In my example it's https://confluence.stiltsoft.com/display/~kkovriga.

The link will be renamed as Kovriga for my example. It will be shown like an ordinary Confluence link (blue and with underline while mouse hovering). The short name of the link can be changed to @kkovriga, assignee, etc., of course.

Hi @Katerina Kovriga _Stiltsoft_ ,

I have already implemented the above solution but the blue hyperlink stands-out from the remaining data in the column which is in tagged form as they are not part of the CASE scenario.  Just wanted to achieve the uniformity. 

It is supposed to be so because we create a native Confluence link as a workaround.

The standard @ symbol won't be recognized by the Table Transformer macro as a functional user @mention.

Thanks. Marking it as answer

Hi @Noori Fathima ,

The Table Transformer macro supports the @CURRENTUSER variable, for example, in a query like this:

SELECT CASE WHEN T1.'Col A' LIKE "%China%"
THEN @CURRENTUSER
END
AS 'New'
FROM T*

Here if the string in the column "Col A" includes "China", then my name will be assigned to this row in the "New" column. For example, my username in Confluence is @kkovriga, it corresponds to Katerina Kovriga, so I'll see Katerina Kovriga in the "New" column.

If somebody else visits this page, he/she will see their own name (as now they are logged into Confluence).


What concerns your case, you may use simple strings to set different names for your colleagues:

SELECT CASE WHEN T1.'Col A' LIKE "%China%"
THEN "Katerina Kovriga"
WHEN T1.'Col A' LIKE "%USA%"
THEN "John Smith"
END
AS 'New'
FROM T*

Hope this helps.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events