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,362,141
Community Members
 
Community Events
168
Community Groups

Hide Empty Table if JQL / Jira Filter Returns No Results (No Issues Found)

Hello Community,

I have a Confluence page with a JIRA Issue/Filter macro.  When the filter returns zero results it shows a table header followed by "No issues found".  Is there a way to hide the table under this circumstance, i.e. I only want to see the table and results if there are issues found.

Image shows current implementation with "no row" table appearing in Confluence page.  I would like to hide this when zero results are returned.

image.png

Thank you,

Emily

2 answers

2 accepted

4 votes
Answer accepted

Hi @Emily Berg ,

If you use the Table Filter and Charts for Confluence app in your company, you may use its Table Transformer macro to hide the "No issues found" message.

Wrap your Jira Issues macro into the Table Transformer macro body and choose the following tab into its settings:

Thu 3-1.png

Here is how your full result table will be displayed:

Thu 3-2.png

And here is an example of the empty table (no rows returned):

Thu 3-3.png

Hope this may help you case.

This worked great, thank you!  I did add in the HTML macro as suggested by Katerina below to completely remove the banner.  Thank you for your fast response.

Emily

2 votes
Answer accepted

Hello @Emily Berg ,

Please use the following CSS to remove the message: 

.table-joiner .wrapper .aui-message.info.aui-message-info{ display: none; }

Add the following CSS to the global, space stylesheet or the HTML macro.

2021-03-25_14h16_52.png

Please note that the 7.1.13 version of Table Filter and Chart already provides the possibility to hide all your source content. Please update and hide it in your case.

2021-03-25_14h13_45.png

Before:

2021-03-25_14h18_50.png

After applying CSS and hiding all content:

2021-03-25_14h18_11.png


Katerina
Stiltsoft

Hi @Katerina Rudkovskaya _Stiltsoft_ and @Katerina Kovriga _Stiltsoft_

This is a great start, thank you! Two follow-up questions:

1. Although the table data no longer appears within the Confluence page, it DOES still appear when I export the page to PDF (using Scroll PDF).  Any thoughts on how to translate to the export?

2. I see that the HTML text is specific to removing the banner.  Is it possible to remove the banner AND replace it with text?  E.g. Remove the banner, but display "No Issues Found".  And again, I would like only the text to be exported, not the banner and not the table.

Thank you!!

Emily

Hi @Emily Berg

1. We'll investigate it and get back to you.

2. Please try to create a small manually created table with the following words inside it: "No Issues Found". Then wrap it and your source table with Table Transformer and use the following SQL query:

SELECT * FROM T1

 

2021-03-25_23h52_06.png2021-03-25_23h52_15.png

By the way, in this case the source table is not exported.

Katerina
Stiltsoft

Hello @Katerina Rudkovskaya _Stiltsoft_ ,

Excellent solution, thank you my export looks great!

Emily

Hello @Emily Berg ,

We've released the fix for thу following issue in the 7.2.0 version:

1. Although the table data no longer appears within the Confluence page, it DOES still appear when I export the page to PDF (using Scroll PDF).  Any thoughts on how to translate to the export?

Katerina
Stiltsoft

Hi @Katerina Rudkovskaya _Stiltsoft_ 

does this also work for the chart from table macro?How?

I tried (within a html macro as described)

<style>

.table-joiner .wrapper .aui-message.info.aui-message-info{ display: none; }
.table-chart .wrapper .aui-message.info.aui-message-info{ display: none; }

</style>

as I use tables and charts, which might have an empty result set.

BR

Chris

Hi @Chris,

As far as I understand you'd like to hide these messages in your case:

2021-11-19_16h37_37.png

Please use this CSS then:

<style>

.table-joiner .wrapper .aui-message.info.aui-message-info{ display: none; }
.tf-chart-message.no-table-message { display: none !important; }

</style>

Katerina 
Stiltsoft

How can I print a custom message when there are no rows returned?

Hi @Rachi Manwal ,

You may use the option given by @Katerina Rudkovskaya _Stiltsoft_ on 25 Mar, 2021 with an additional Table Transformer and a mini-table.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events