Confluence - Jira Macro. How to exclude 'issues' text from the retuned value

Jitendra Shembekar April 18, 2023

Whenever we use JIRA macro in Confluence, it returns value like - 105 issues.

If I want to get only the numeric value and exclude text 'issues', is it possible?

 

If this is possible then it will help a great deal in performing automated arithmetic operations in Confluence, by pulling values in a table and then using table transformer (sql queries) macro. 

2 answers

1 accepted

1 vote
Answer accepted
Stiltsoft support
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 Leaders.
April 19, 2023

Hi @Jitendra Shembekar ,

You may use an additional Table Transformer macro to split your string by the space character and leave only numbers:

Wed 3-1.png

SELECT *,
T1.'Column 2'->split(" ")->0 AS 'Column 2'
FROM T*

Wed 3-2.png

Hope this helps your case.

Jitendra Shembekar May 22, 2023

Hi @Stiltsoft support 

Thanks for the revert. I tried the suggested solution but I am getting parsing error.

Here is the table I am using

1.JPG

This is the formula I am using

SELECT *,
T1.'Issues'->split(" ")->0 AS T1.'Issues'
FROM T*

This is the error

2.JPG

Can you please check what is wrong here. Thanks in advance for your help!

Stiltsoft support
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 Leaders.
May 22, 2023

Try to use not

SELECT *,
T1.'Issues'->split(" ")->0 AS T1.'Issues'
FROM T*

but just

SELECT *,
T1.'Issues'->split(" ")->0 AS 'Issues'
FROM T*

Like Jitendra Shembekar likes this
Jitendra Shembekar May 22, 2023

@Stiltsoft support - I found the mistake in my formula. :)

 

Thanks a lot for the solution. You guys rock! Excellent!!

Like Stiltsoft support likes this
1 vote
Craig Nodwell
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2023

Hi @Jitendra Shembekar this is fully possible.  When you are in the macro definition there is a link in there for Display Options.  In Display Options you can select Issue Count Only.

Jitendra Shembekar May 22, 2023

Hi @Craig Nodwell 

Yes I am using that option, but it gives output like this - '66 issues' not just the number '66'.

Thanks!

1.JPG

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events