In the planning meetings prior to our third FedEx Day Eric started talking about implementing a project archival plugin for Jira, as many of our customers had a need for this kind of functionality. Well, I took the challenge and here’s an overview of what I came up with.
The goal of the project was to implement a concept of an archival plugin that would allow the user to perform the following functions:
- Archive Jira projects in such a way that they are completely hidden from regular users. Additionally, they should be removed from the database, search indexes etc.
- Administrators should be able to browse the archived projects from the administrator UI and make basic searches directly to the archived data to e.g. read the description and comments related to a specific issue
- Restore archived projects back to Jira
Ambitious enough for 24 hours, including sleep?
The technology chosen for the implementation was the so called Jelly scripting that is available in Jira. Jelly scripts enable Jira administrators to import content and perform different functions in Jira by using a simple XML-based representation. So, by implementing a tool that would generate Jelly scripts as its output we could use the existing Jelly Runner functionality for restoring the projects back to Jira. The exported archive files are saved under Jira’s home directory.
The most notable restrictions for the implementation are set by the capabilities of Jira’s Jelly tags, as they don’t support every detail that Jira offers. However, new Jelly tags can be implemented so given enough effort it is possible to go around these limitations. Also, importing through Jelly does not preserve any identifiers in the system, so for example issue numbers may change after a complete archive and restore cycle. In practice this means that the tool is not, and will not be, a fully featured import/export tool, but it could be good enough for archival purposes.
Here are some screenshots:
Links for Archive Project and Archived Projects functions were added.
Before archiving (and deleting) the project a confirmation is required from the user.
Archived projects view
The archived projects view displays a list of the archived projects. The basic information for the project is loaded from inside the archive file.
To summarize, the prototype works well and with some additional work could be made into an actually useful plugin.
What is working:
- User interface modifications
- Archival for projects, versions, components, issues and comments
- Restoring project archives by using the Jelly Runner tool (manually..)
- Listing of archived projects
- Basic functionality for displaying information from the archive files
What is still missing:
- Actually removing the project after archival (must be done manually now); easier to test this way
- Restoring, browsing and deleting archived projects directly in the UI
- Export currently saves only a subset of the data, missing features include:
- Issue states (all restored issues are left in the Open state)
- Custom fields
- Issue links
Would you have a need for something like this in your organization? Talk to Eric!