Can we change the headers for the Task Report macro?
Asked by Tristan Albach:

Is it possible to get access to the source code for the Task Report macro? We were hoping to create a version of the macro that used different headings for the resulting table, but otherwise behave exactly the same. If we got access to the source code, would it be as simple as copying and pasting the code into a User Macro and changing the headers in the code or would it need to be more involved than that?


Answers:
author: Shannon S
body: Hi Tristan,

It's possible to [edit bundled plugins](https://confluence.atlassian.com/confkb/how-to-edit-bundled-or-system-plugins-302811979.html) by modifying the JAR file.

You can review [How to edit files in Confluence JAR files](https://confluence.atlassian.com/confkb/how-to-edit-files-in-confluence-jar-files-103711179.html) for more details.

Be aware that it may not be as simple as modifying a few lines on the file, so you will want to set up a staging instance first in order to test.

Do let me know if you have any questions about that.

Regards,

Shannon

comments: author: Tristan Albach
body: Hi Shannon,

Sorry for the very delayed response. So, would editing these JAR files change the plugin for everyone that uses the instance? Or is there a way to change the plugin for just a single space? Or create a different version of the plugin, so that everyone in the same instance could choose which version of the plugin they want to use?


author: Shannon S
body: Hi Tristan,

When you edit the JAR file, it modifies for the entire instance. You can indeed create versions, if you were to download the JAR, edit it, and re-upload it as a 2nd version. You'll want to use a different filename for this.

You will want to be aware that any issues stemming from this kind of modification is not supported. It may also be possible that any edits you make may not work in the future, even with a minor product update.

Our recommendation would be to create a [user macro](https://confluence.atlassian.com/doc/writing-user-macros-4485.html), which is more compatible with upgrades. It's also easier to obtain support for these, via the Community or the [Developer Community](https://community.developer.atlassian.com/).

I hope that helps! Let us know if you have any questions.

Regards,

Shannon


author: Tristan Albach
body: Hi Shannon,

Yes, User Macros were the method I was hoping to use. I'm just not experienced enough to write it myself. Could a macro be written to act as a wrapper around the Task Report macro that would allow the headers names to be changed to whatever the user selects? Is there a more efficient path to take? Should I post this specific request as a new topic?


author: Shannon S
body: Tristan,

Possibly, but I am myself not very familiar with writing User Macros so I cannot say for sure.

I would indeed recommend raising a new question; a lot of our Community members are pretty good at writing User Macros and so they'd be able to tell you how to do that.

Let me know if you have any trouble!

Regards,

Shannon


author: Tristan Albach
body: I asked the [new question](https://community.atlassian.com/t5/Confluence-questions/How-to-write-a-User-Macro-that-changes-the-header-titles-on-the/qaq-p/977802#M129621 "How to write a User Macro that changes the header titles on the Task Report Macro?") to the community, thank you!


author: Shannon S
body: Thank you for linking me! I'll go ahead and watch that one as well.

Take care,

Shannon


author: Tristan Albach
body: No problem :-)


Tags: confluence-server

report

server