O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Redmine Plugin Extension and Development

Book Description

If you'd like to customize Redmine to meet your own precise project management needs, this is the ideal guide to understanding and realizing the full potential of plugins. Full of real-world examples and clear instructions.

In Detail

Redmine is a flexible project management web application that is cross-platform and cross-database. Redmine handles multiple projects and provides integrated project management features, issue tracking, and support for various version control systems.

This book provides an overview of the tools available to potential plugin authors who want to extend and enhance a product to work their way. It is meant to teach developers who have existing Ruby on Rails experience on how they can properly extend Redmine through custom plugins.

In this book, existing models, views, and controllers will be extended through the use of hooks. You will learn how custom updates can be tied into project and system activity streams.

Plugin models will be made searchable and custom permissions and security will be discussed. This book will also teach you how to create a sustainable plugin for an established product and maintain an ongoing relationship with the Redmine community as it relates to a new plugin.

Reading this book will provide you with the necessary skills to quickly and efficiently extend products through plugins.

What You Will Learn

  • Understand the basic plugin setup from scratch
  • Exercise core Redmine enhancement through the use of model/view/controller/helper hooks
  • Apply and control the ability to attach files to custom models
  • Discover how to lock down content area access by leveraging the existing security infrastructure
  • Learn how to make model fields searchable within Redmine's existing search subsystem
  • Enable custom updates to be mixed into Redmine's project and system activity streams

Table of Contents

  1. Redmine Plugin Extension and Development
    1. Table of Contents
    2. Redmine Plugin Extension and Development
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
        1. Customer support
        2. Downloading the example code
        3. Errata
        4. Piracy
        5. Questions
    8. 1. Introduction to Redmine Plugins
      1. An introduction to our sample plugin
      2. Generating a new plugin
        1. Using custom gemsets in our plugin
        2. Generating models and controllers
      3. Diving into the initialization file
        1. Plugin attributes
        2. Initialization checks
          1. Checking for a specific Redmine version
          2. Ensuring the existence of other plugins
        3. Extending core Redmine features
          1. Working with Redmine menus
          2. Initializing named permissions
          3. Project module availability
          4. Adding custom events to the activity stream
          5. Registering custom text formatting macros
      4. Summary
    9. 2. Extending Redmine Using Hooks
      1. Understanding hooks
      2. View hooks
      3. Controller hooks
      4. Model hooks
      5. Helper hooks
      6. A sample view hook implementation
        1. Identifying the callback
        2. Integrating the hook
        3. Creating the view partial
      7. Summary
    10. 3. Permissions and Security
      1. Summarizing Redmine's permission system
      2. Declaring custom permissions
      3. Ensuring access restrictions in models, views, and controllers
      4. Understanding custom content access control
        1. Managing user whitelists
        2. Restricting access via whitelists
        3. Enforcing the whitelist
      5. Summary
    11. 4. Attaching Files to Models
      1. Model preparation
      2. Enabling attachments in our views
      3. Controller modifications to accommodate attachments
      4. Listing and managing attachments
      5. Managing attachment permissions
      6. Summary
    12. 5. Making Models Searchable
      1. Registering our plugin
      2. Preparing our models to be searched
      3. Configuring search options
      4. Filtering search results using custom permissions
      5. Including article content in the search
      6. Summary
    13. 6. Interacting with the Activity Stream
      1. Overview of the activity stream
      2. Preparing our model
      3. Registering our model
      4. Configuring an activity provider
      5. Customizing activity entries
      6. Summary
    14. 7. Managing Plugin Settings
      1. An overview of Redmine's global plugin settings
      2. Enabling settings management
      3. Configuration management
      4. Exposing plugin methods to the settings partial
      5. Accessing our settings
      6. Summary
    15. 8. Testing Your Plugin
      1. Testing infrastructure layout
      2. Basics of test fixtures
        1. Working around a Redmine testing issue
      3. Running tests
      4. Writing functional tests
      5. Writing integration tests
      6. Writing unit tests
      7. Preparing a test database
      8. Continuous integration with Travis
      9. Summary
    16. A. Releasing Your Plugin
      1. Managing your plugin's source code
      2. Starting a blog
      3. Publishing your plugin on redmine.org
      4. Announcing your plugin on redmine.org
      5. Summary
    17. Index