Dynamic JQL queries on a table
Asked by Fernando A C:

I have a table in Confluence where the numeric value of each cell is populated with a "Jira Issues" macro that counts issues. I wanted to know if it is possible to modify the JQL query based on a value entered by the user (project) so that I do not have to edit the query by hand.

Possible options are, for example, in a drop-down list or in a Jira tag. Another possibility would be to have a 1x1 table with the value and do it with some table macro.

I wanted to know if it is possible and how it could be done. Thanks in advance


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@Fernando A C](/t5/user/viewprofilepage/user-id/5201048) ,

welcome to the Atlassian community!

You can't do that using builtin features. You can try the following powerful app [https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?tab=overview\&hosting=server](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?tab=overview&hosting=server) that provides exactly what you are looking for <https://stiltsoft.com/blog/table-filter-and-charts-with-jira-issue-macro/>

Hope this helps,

Fabio

comments: author: Stiltsoft support
body: Hi [@Fernando A C](/t5/user/viewprofilepage/user-id/5201048) ,

[@Fabio Racobaldo _Herzum_](/t5/user/viewprofilepage/user-id/781528) has kindly mentioned our [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?tab=overview&hosting=datacenter&utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) app, so let me clarify the case a little bit.

Other macros (and ours as well) can't change the JQL query inside your Jira Issues macro. So, if your case is that you paste several Jira Issues macros inside your manually created table and choose to show the number of issues (for example, "10 issues", "15 issues", etc.), then nothing can be done here: you need to open each Jira Issues macro and manually change the JQL query.

But our macros may help if you use the Jira Issues macro in a tabular form. There you may type in the most general JQL (for example, to get all the issues from several projects) and then use our macros (for example, [Pivot Table](https://docs.stiltsoft.com/tfac/dc-server/how-to-use-pivot-table-macro-42239659.html?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111), [Table Filter](https://docs.stiltsoft.com/tfac/dc-server/how-to-use-table-filter-macro-42239756.html?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111), Table Transformer, etc.) to filter and aggregate your data from the page view mode.

For example, filter by the specific project, then by status and then aggregate issues by assignees.

[Here](https://docs.stiltsoft.com/tfac/dc-server/how-to-use-the-app-with-jira-issues-42241655.html?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) you may find several examples how to turn your tabular Jira Issues macros into neat and easy-to-read dashboards.

Hope this helps your case.


Tags: confluence-server

filter

issue

server

table

table-filter

table-filter-and-charts