The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Display count of Jira issues without suffix "issues" in confluence page

Arvind Sinha
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 14, 2019

I have a confluence page in which I want to fill count of issues based on my pre-defined Jira queries using Jira Issues Macro (via JQL). The returned value is always having a suffix “issues”. How to get only he number without the suffix?

My query is related to the Jira Macro page https://confluence.atlassian.com/doc/jira-issues-macro-139380.html

 

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Natalie Paramonova _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 16, 2021

Hi @Arvind Sinha ,

If you insert the issue count option in a table cell, You can remove the word 'issues' with the help of the Table Transformer macro (the Table Filter and Charts for Confluence app).

Please find the detailed instructions in the answers to this question.

Arvind Sinha
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 9, 2021

Hello @Natalie Paramonova _Stiltsoft_ ,

Thank you so much for this help. It works.

However, with this the clickable links with the numbers are also removed, so we can't go to the list of filtered jira issue by clicking the numbers. Is there any way to achieve that as well?

Natalie Paramonova _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
September 28, 2021

Hello @Arvind Sinha ,

You can apply the following query to preserve Jira filter links:

 

SELECT T1.'Date',
FORMATWIKI( "["+(T1.'Count'->split(" issues")->0::number) +"|" +
T1.'Count'->tfView->match("href=([^ >]*)")->1->slice(1, -1)
+ "]"
) AS 'Count'
FROM T*

 

Screenshot 2021-09-28 at 17.18.00.png

Like Ramu likes this
Behckam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 8, 2023

 

 

Ramu
Contributor
July 7, 2024

Hi Natalie @Elena Ovdienko _Stiltsoft_  ..

 

Your code of FORMATWIKI logic works wonder and im able to utilise it .. just a little ask ..

 

This code of yours works fine in general except one scenario .. i.e.,

whenever, there is issue count as '1' then it throws/returns 'NaN' ... tried my luck of tweaking the code but nothing so far .. 

 

Please help on this .. 

 

To conclude, it works wonder for all the numbers BUT, when the count is '1' .. it returns 'NaN' ..

 

0 votes
Amith Mathur {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 14, 2019

Hi @Arvind Sinha , 

Welcome to the Atlassian Community. If you are referring to "issues" which is displaying the issue count on a Confluence page, "100 issues", then it is the default one and it cannot be removed.

Thanks,

Amith Mathur

TAGS
AUG Leaders

Atlassian Community Events