Hi Eric,
Two things worth mentioning:
- You can't change the output type of macros. Macros always return a String. Of course the String could contain only a number but if we're talking about data types it is still a String.
- The examples you linked to use Confluence default macros such as "jira" or "jiraissues". Therefore you don't really have control over their output.
I see a few possible solutions to your problem here:
- You could build your own user macro that doesn't rely on a Confluence default macro and instead makes the request itself. (Could be quite complex and requires good user macro programming knowledge on your part)
- You could include some JavaScript in your user macro that removes the " issues" part from your result so only the numbers stays. (Probably way simpler, but very janky and generally not advisable)
- You could use a third party solution like our app PocketQuery. In PocketQuery you could simply set up a JQL REST query that fetches your data. You can then write a velocity template for it that defines how the data should be rendered. In your case this should be very simple. And since you're already building complex user macros to begin with you might find that PocketQuery will make your life a lot easier in many other situations where you want to show data from external sources as well. If you want to give it a shot and have any questions you can always ask our support. We're happy to help! :)
Best regards,
Sven
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.