Project

General

Profile

Creating Patches

We are creating patches for Redmine in case we found a bug or want to request a feature we have already implemented.

For further information how to contribute to Redmine read the Submission Guide on redmine.org.

Check existing issues on redmine.org

Before you start to create a patch for contributing to Redmine check open issues on redmine.org. Look also on closed issues in upcoming release versions. Very often someone has already opened an issue for the same subject as you would like to do.

Update your environment

First you need to update your Redmine installation to the latest development state for the latest stable branch and master. See Update Redmine Repository for detailed instructions.

Checkout a working branch

  1. Make sure there is a ticket for the change.
  2. Before you start to make your changes you need to checkout a working branch.
  3. Decide on which branch you want to be your working branch based.
  4. Stick to our naming conventions for working branches.

Make your changes

  1. Change the code very carefully.
  2. Change also automated tests or add some.
  3. Test your change also manually.
  4. Commit your changes to your local git repository.

Create a patch file

  1. Checkout the development branch (base-branch) on which your working branch is based.
  2. Think about a suitable name for the patch file
  3. Create a patch file:
# single changed file 
(user@host):~/path/to/redmine$ git diff <base-branch>:path/to/changed/file..<working-branch>:path/to/changed/file > <name-of-patch-file>.patch

# multiple changed files
(user@host):~/path/to/redmine$ git diff <base-branch>..<working-branch> > <name-of-patch-file>.patch

Submit your patch

  1. Log into redmine.org or register first.
  2. Create a new ticket with all information required to understand the issue.
  3. Before saving the ticket upload your patch.