Forge Macro in Page Properties Report

Mohammad Zaman February 23, 2024

Hello, 

I have Page Properties Report macros set up to display a list of pages. Within these pages, I've integrated custom macros developed with Forge and UI Kit.

A single Standalone page: Macros work fine (first 4 rows) 

standalone-page.png

 

Errors:


As you saw above, the macros work fine in any standalone page, but displays error in the Page Properties  Report (see the image below). 

PagePropertiesReport.png


There are 3 things happening in the image above.

1.The first error occurred in the 'Test CreatedBy' column, where the 'we don't have a way to export this macro' error was encountered due to the usage of UI Kit 2. Interestingly, the macro works fine and displays the value 'Hello World (UI Kit 2)' on standalone pages.

2.The second issue arises with errors in the TestCreationDate and TestLastModifiedDate columns, both utilizing Forge macros with UI Kit. While these macros function correctly on standalone pages, they fail to display properly within the Page Properties Report.

I've developed three separate components in three different JSX files and specified them in the manifest.yml file. To insert these macros into pages, I use a forward slash followed by the macro name or title. This allows the page to display the values generated by these macros.


.jsx_files.pngmanifest.png


3.  This is an interesting discovery: none of the approaches worked within the Page Properties Report Macro except for this specific method. By copying the code from creationDate.jsx and pasting it into the index.jsx file, the macro successfully displays values both on standalone pages and within the Page Properties Report Macro..

Question:

1. how do I fix the first error if i want to use UI kit2 ? 

 

2 & 3) Why is it that creating multiple macros in JSX and defining them in the manifest.yml file as macro doesn't function properly within the Page Properties Report Macro, but does work when solely defined in index.jsx?

Do I have to create a separate forge app with source code in index.jsx, and then  deploy  and install them? 

If i completely remove main: index.js from package.json and keep the other file , i get a package_json.png
different error: We've Encountered an issue exporting this macro. Please Try exporting this page again later.

 

Thanks in advanced. 

 

1 answer

0 votes
Wolfgang LANDES
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 5, 2024

@Mohammad Zaman

I just wanted to let you know that I am facing the same problem. 

Migrated an custom macro to UI Kit 2 (now UI Kit) and it worked fine on the individual pages. But breaks on the page properties report.

Any updates from Atlassian on this?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events