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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,465,985
Community Members
 
Community Events
176
Community Groups

Can I dynamically populate the fields of a table, based on values introduced on another table?

Hi,

Lets say I have two separate tables in which I keep different information regarding same items (Jira tickets) - table 1 with info about the team, start/end date, etc, and table 2 with issues encounter working with/on that ticket. 

1. Can I dynamically populate some fields from table 2, with info from table 1, based on values introduced on a certain column in table 1? 

I mean, if in table 1 I have a column in which I introduce YES/NO based on if I had issues or not when working with that ticket, and if the answer is YES, to dynamically populate Ticket NO from table 2, with the number of the ticket introduced in table 1

 

Thanks! 

1 answer

1 accepted

4 votes
Answer accepted

Hi @Marina Culeasca ,

We can suggest trying our app - Table Filter and Charts for Confluence.

Wrap your Table 1 in the Table Excerpt macro:

Issues 1.pngIssues 3.pngThen reuse your Table 1 with the help of the Table Excerpt Include macro and wrap it and your Table 2 first in the Table Transformer and then in the Table Filter macro.

Issues 2.pngUse the Table Transformer macro to look up your tables by the unique 'Key' field:

Issues 4.pngAnd set the Table Filter macro to show only rows with the 'YES' issue encounter:

Issues 5.pngIssues 6.pngNow your result Table 2 will look as required when the page is published:

Issues 7.pngNote that if your Confluence hosting type is Cloud, you'll need the Table Toolbox macro to nest several macros due to the new editor limitations.

@Katerina Kovriga _Stiltsoft_ I am looking to do the same thing.. I think. Only I would like to make a table consisting of data from JIRA and one column that will be filled out manually. 

I can't figure out from the example above how to do to that? The example above seems to be all manually entered data?

Can you help me?

Like # people like this

Hi @Daisy Fischlein Steffensen ,

The basic conception is the same: you insert the Table Transformer macro and wrap two tables inside its body - the Jira Issues table and an additional manually created table for your comments.

Wed 1-1.pngTo lookup the tables, you'll need a unique field. As we don't use any custom fields, I choose the standard 'Key' field to serve this purpose.

Now go to the Table Transformer macro settings and enter the following custom SQL query:

SELECT T1.'Key', T1.'Summary', T1.'Created', T1.'Assignee', T1.'Status', T2.'Manually Added Comment' FROM T1 JOIN T2 ON T1.'Key' = T2.'Key'

As you can see, the query is very simple: you define the columns (and their order as well!) that you want to show in the result table and lookup the two tables by the 'Key' column.

Wed 1-2.pngAnd here is the result when the page is published:

Wed 1-3.pngHope this helps.

Like # people like this

Thanks I made it work.. only some of my colleagues has their default browser language set to "Danish".

That means that the JIRA column "Key" is translated to "Nøgle".. this ruins the mapping between the two tables. 

It looks correct for me, because my browser language is English. 

Do you have any suggestions on how to handle that, so everyone viewing the table will see the table correctly?

@Daisy Fischlein Steffensen , modify your SQL query a little bit to check both variants of the "Key" field:

Previous version

SELECT T1.'Key', T1.'Summary', T1.'Created', T1.'Assignee', T1.'Status', T2.'Manually Added Comment' FROM T1 JOIN T2 ON T1.'Key' = T2.'Key'

New version

SELECT COALESCE(T1.'Key', T1.'Nøgle') AS 'Key', T1.'Summary', T1.'Created', T1.'Assignee', T1.'Status', T2.'Manually Added Comment' FROM T1 JOIN T2 ON COALESCE(T1.'Key', T1.'Nøgle') = COALESCE(T2.'Key', T2.'Nøgle')

Besides with the function COALESCE(T1.'English field name', T1.'Danish field name') AS 'English field name' you can check other Jira fields (such as Summary, Created, Assignee, etc.) so that they will be shown despite the language settings and in English. It seems that other fields are also translated in Danish for your colleagues, so you need to modify the query for them as well.

@Katerina Kovriga _Stiltsoft_ I'm looking at this second answer using the Table Transformer macro you provided to Daisy. My question for you is how did you populate the Key column in T2?

The Key column in T2 is populated manually - you type in the issue key in the first column and some comments and other notes into other columns.

T2 shouldn't always match T1. For example, you may have 10 rows (10 issues) coming from the Jira Issues macro. But you want to leave comments only for the two specific issues. So, your T2 will consist of the header row and two data rows (the keys of these two issues and your comments).

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events