Forums

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

User macro nesting problem

László Pecsenye
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!
July 31, 2019

Hi all,

I'm trying to create a new user macro to achieve following:

  • It asks a JIRA issue id as a parameter.
  • It includes the given JIRA issue into the page as table
    • Column list of JIRA issue is fixed (e.g. key, summary, description)
  • It adds some extra formatting (CSS code) to the table.

My user macro includes the jiraissues macro.

If I include only one JIRA issue into a page, then my macro works fine. But if I try to include more instances of my macro (more jira issues) into the same page, then only the very first JIRA issue is included and it is repeated many times.

 

Here is the source of my user macro:

## Macro title: BRS JIRA követelmény
## Macro has a body: N
## Body processing: Rendered
## Output: XHTML
##
## Developed by: Pecsenye László
## Date created: 30/07/2019

## @param reqId:title=JIRA Req ID|type=string|required=true|desc=JIRA Req ID

<style>
.brs-jira-req .jira-issues table tbody tr th {
display: none;
}
.brs-jira-req .jira-issues table tbody tr.rowNormal td.jira-macro-table-underline-pdfexport {
display: inline-block;
}

</style>

<div class="brs-jira-req">

<ac:structured-macro ac:name="jiraissues" ac:schema-version="1" ac:macro-id="$!paramreqId">
<ac:parameter ac:name="url">http://localhost:8080/browse/?jql=key%20%3D%20$!paramreqId</ac:parameter>
<ac:parameter ac:name="columns">key;summary;description</ac:parameter>
<ac:parameter ac:name="renderMode">static</ac:parameter>

</ac:structured-macro>
</div>

 

Any ideas?

Thanks in advance,

LAci 

1 answer

1 accepted

1 vote
Answer accepted
JP _AC Bielefeld Leader_
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.
July 31, 2019

Hi,

what Jira & Confluence version are you using?

I ask because I cannot recognize the macro you're referencing.

When I embed a Jira macro in Confluence the storage format looks like:

<ac:structured-macro ac:macro-id="55ff4992-013f-4f42-8d4d-00f6e0fdf217" ac:name="jira" ac:schema-version="1">
<ac:parameter ac:name="server">My Jira Server Name</ac:parameter>
<ac:parameter ac:name="serverId">the server id</ac:parameter>
<ac:parameter ac:name="key">JIRA-1234</ac:parameter>
</ac:structured-macro>

or as a table

<ac:structured-macro ac:macro-id="6cb4b3ad-e0e6-4fac-86a3-dd6269dd4398" ac:name="jira" ac:schema-version="1">
<ac:parameter ac:name="server">My Jira Server Name</ac:parameter>
<ac:parameter ac:name="columns">key,summary,description</ac:parameter>
<ac:parameter ac:name="maximumIssues">5</ac:parameter>
<ac:parameter ac:name="jqlQuery">project = JIRA AND assignee = "abc" AND NOT resolution IS EMPTY ORDER BY updated </ac:parameter>
<ac:parameter ac:name="serverId">the server id</ac:parameter>
</ac:structured-macro> 

It seems to me, that a non-standard macro is used. If this is the case please contact the macro app vendor.

Best

JP 

JP _AC Bielefeld Leader_
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.
July 31, 2019

Hi again,

pretty sure you're using an older version of Jira and/or Confluence.

I'll try your macro with the latest versions.

Best

JP

László Pecsenye
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!
August 1, 2019

Hello JP,

Currently I'm using the evaluation version (local server) of Confluence 6.15.7 + JIRA v8.3.0#803001).

Anyway, I rewrote my embed code according to your 2nd example, and now it is working as expected.

 

Thank you for your quick help.

 

BR,

LAci

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events