How to create checkbox/tasklist in user macro for dynamic content?

Hi All

In the below macro, I am fetching the JQL results from JIRA by inserting JQL inside the macro body.

Macro title: BatchDoD

@param maxRows:title=Max Rows|type=int|required=true|default=20|desc=Enter the max rows, anything above 1000 will only display 1000 rows.

@param columns:title=Columns|type=string|required=true|default=summary|desc=Enter the columns you want returned.

@param Server:title=server|type=string|required=true|default=JIRA|desc=jira server name

@param ServerId:title=serverId|type=string|required=true|desc=jira server id

#set ($body = $body.replaceAll("\Q

\E",""))
#set ($body = $body.replaceAll("\Q

\E",""))
#set ($body = $body.replaceAll("\Q\E",""))
#set ($body = $body.replaceAll("\Q
\E",""))
#set ($body = $body.trim())

JIRA $paramcolumns $parammaxRows $body **********

Is it possible to insert tasklist for each JQL/Filter results as below on the confluence page with the help of USER MACRO?

tasklist

Regards

Sushma