Book Image

Redmine Plugin Extension and Development

By : Alex Bevilacqua
Book Image

Redmine Plugin Extension and Development

By: Alex Bevilacqua

Overview of this book

Table of Contents (16 chapters)
Redmine Plugin Extension and Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

A sample view hook implementation


We will be glossing over a lot of implementation details as they are out of the scope for this book, but the full code will be available on the GitHub repository at https://github.com/alexbevi/redmine_knowledgebase.

Identifying the callback

We've determined that our plugin will be hooking into the existing issue tracking system in order to allow users to attach knowledgebase articles.

The desired functionality is the same as the Subtasks functionality that already exists, so we will model our hook after that.

Our first step is to determine which hook best suits our needs. In order to add additional functionality to the existing issues#show view, we will choose the :view_issues_show_description_bottom hook as it allows us to insert a partial just below the standard issue details form, as indicated in the following screenshot:

With the desired view hook identified, we need to define a listener class and tie that into our plugin initialization code.

Integrating the...