Skip to main content
Skip table of contents

Report macro: Insert a traceability matrix into a page

You can now share your traceability matrices more easily with your coworkers, by inserting them in your Confluence pages.

How to embed your report

In the Confluence page editor:

  • Type /req to access the RY macros, and select the RY Report macro

  • Select the desired saved matrix

  • You can notice the ‘Share' toggle: If your saved matrix is private, you’ll need to share it to be able to display it in the report. The permissions will now be set to ‘View’ only.

RY Report Macro - Choose your matrix.png

By default, we display the title and description of the matrix. If you do not want to see them in the Confluence page, you can remove them with the toggle.

Insert your ry report.png

Once the report is embedded and the page published, you can interact with the report like you would in the Traceability tab:

  • Move/Add/Remove columns, click on requirement keys to show their details, etc… Note that the changes you make in the visualisation of the report will not be saved, nor edit the actual saved matrix.

  • To make permanent changes to the report, go to the Saved queries tab, select the macro you wish to change, make your changes, and don’t forget to save.

Advanced options

Edit external properties in the Report

On macro creation, you can decide to allow users to edit the external properties directly in the Confluence page by checking “Enable the edition of external properties in the report macro”

Changes to external property values will then be saved.

Use template variables

The report macro supports template variables in the search query to make traceability matrices modular and reusable.

  • Template variables allow you to save traceability matrices with a dynamic search query that can be adjusted when used in a report macro, without modifying the original traceability matrix.

  • This is particularly useful when embedding the same traceability matrix across multiple Confluence pages with only slight modifications to the search query.

Syntax for template variables

Template variables are defined using:

  • A dollar sign $,

  • Curly braces { }

  • And a given name (e.g. ${variableName}).

  • You can also provide a default value by appending a colon : , followed by the default value (e.g. ${variableName:Default value}).

ℹ️ If you have description, text or property that looks like a variable but is not one, you can escape the characters using a backslash (e.g. \${variableName}).

Example:

  • ${prefix}: A variable named prefix with no default value.

  • ${prefix:BR}: A variable named prefix with a default value of BR.

  • \${prefix}: Literal text ${prefix} that should not be treated as a variable.

System variables

You can also use system variable allowing you to have dynamic reports based on your current page or variant. The use is the same as template variables, however the variable name here are fixed:

  • SYSTEM_PAGE_ID : will be replaced by the page where the report is inserted in

    • e.g. key ~ 'BR%' and page = ${SYSTEM_PAGE_ID} will show all the requirements having a key starting by “BR” and being defined in the page where the report is inserted in.

  • SYSTEM_VARIANT_NAME and SYSTEM_VARIANT_ID :

    • e.g. key ~ 'BR%' AND variant = '${SYSTEM_VARIANT_NAME}' will show all the requirements having a key starting by “BR” and being in the variant of the current page where the report is inserted in.

  • IN DEVELOPMENT SYSTEM_SPACE_KEY

    • e.g. key ~ 'BR%' AND space = '${SYSTEM_SPACE_KEY}' will show all the requirements having a key starting by “BR” and being in the space of the current page where the report is inserted in.

How to use template variables in the “Traceability” tab

  • Navigate to the Traceability tab.

  • Use a template variables in the search query (e.g: ${prefix})

  • When the search query contains variables, a Variables dropdown is displayed in the search bar.

Screenshot from 2024-12-05 15-42-09.png
  • The Variables dropdown allows you to test and preview the traceability matrix by dynamically setting variable values. The variable values defined here are not saved, they are for preview purposes only.

Screenshot from 2024-12-05 15-43-38.png
Screenshot from 2024-12-05 15-43-01.png
  • Once you’re satisfied with your search query, you can save the traceability matrix.

Screenshot from 2024-12-05 16-11-52.png

How to use template variables in the report macro editor

  • Edit your Confluence page and insert a report macro. Select the traceability matrix containing template variables.

Screenshot from 2024-12-05 15-46-21.png
  • When the search query of a traceability matrix contains template variables, the macro editor allows you to define a value for each variable. If a value is left blank, the default value of the variable is used (or an empty string if there is no default value).

Screenshot from 2024-12-05 15-46-47.png

  • Insert the report macro.

Screenshot from 2024-12-05 15-46-53.png

  • The report macro will be rendered using the provided values.

Screenshot from 2024-12-05 15-47-29.png

Export your reports in PDF

You can export your reports in PDF by clicking on the three dots at the top-right of the page and on export. The dynamic RY Report macro will be visible just like this:

RY Report in PDF.png

Permissions cross spaces

You can insert macros that pull data from an other Confluence space. The report macro uses the permissions of the space where it was saved to display requirements.

As an exemple, if Alice creates a report in space A, and decides to insert it in space B, Bob will not be able to see the results of the report if he doesn’t have the view permission on space A.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.