Provide a supported API to read all user macros from Confluence DC 10.2.13+ onwards

XMLWordPrintable

      Current Situation

      Up to Confluence 10.x, Marketplace apps can read user macros from Bandana using the key atlassian.confluence.user.macros.

      Since Confluence 10.2.13, user macros are stored in the USER_MACRO table, and Bandana was removed in 11.0. There's now no supported way for an app to read all user macros:

      UserMacroLibrary isn't exported to apps, so @ComponentImport fails.

      The workarounds are ContainerManager.getComponent("userMacroLibrary", UserMacroLibrary.class) or a custom Hibernate query on USER_MACRO. Both depend on internal parts of Confluence that could change.

      Use case 

      This restricts Marketplace partner apps from becoming compatible with Confluence 10.2.13+ and 11.x.

      Suggestion

      • Export UserMacroLibrary to apps so @ComponentImport works.
      • Add a way to list all user macros, including hidden ones, adding new macros, removing macros
      • Add any other read operations apps need .

              Assignee:
              Unassigned
              Reporter:
              Nitin Rastogi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: