How to contribute new features

=Contribution process=

We are always encouraging users to contribute new features or fix bug they have developed. If you are planning to code a stunning new feature and you want it to be implemented at the core so you are future save when updating later, please proceed as follows:
 * 1) Use the latest Github version for your development
 * 2) Open a new ticket at our bugtracker at the good project part:
 * 3) Bug report for a bug
 * 4) Feature request for a new feature
 * 5) Development is more for fix the internal system
 * 6) If you already have fix : make a pull request at github. Remember the Standard for Git commit messages
 * 7) Describe your feature as detailed as possible and tell us about the implementation details (what code you want to add, which files you are planning to change, which GUI parts have to be extended, ...)
 * 8) We will then assign the ticket to one of our developers and discuss your approach. It's important to tell us about your plans before you start coding because otherwise you might take the wrong way when implementing new features so we might have to say "Sorry, we can't take that one (because of security problems or what so ever)".
 * 9) Once implementation details were discussed just start coding and create a Github pull request afterwards and ask for a developer to review your coding.
 * 10) Make sure to write unit or functional tests that tests your new functionality. If you don't know how to set it up, please read this manual page or ask in the #limesurvey IRC channel for help.
 * 11) There might be some further discussions about implementation details but once this was solved, your feature will be available in the next new version.

Please remember that new features should as much as possible be in new files.

=Internal contribution process=

(This section is only relevant for employees at LimeSurvey GmbH.)

As above, but using gitflow instead of pull-requests. Especially:


 * New features are always on feature branches
 * New features are never merged into develop branch before QA
 * Bug fixes are in bug branches and merged after they are tested by another developer
 * Trivial fixes can be applied in the development branch directly (trivial fixes are e.g. one line or changing a localization typo in multiple lines)

=Branch naming=

All bug branches should be prefixed with, where the number points to relevant Mantis issue on bugs.limesurvey.org.

All feature branches should be prefixed with, where the number points to relevant Mantis issue on bugs.limesurvey.org.

GitFlow examples.

=Rebase and merge=

When a branch is merged into master or develop branch, use the following procedure (using bug/15469-submit-invalid-part as an example bug branch):

Source.



git checkout bug/15469-submit-invalid-part git rebase develop (Already OK in this case) git checkout develop git merge bug/15469-submit-invalid-part (Fast-forward happening) git push

Then delete the branch with:

git push -d origin bug/15469-submit-invalid-part git branch -d bug/15469-submit-invalid-part

=Specification=

All new features should be specified using scenarios or user-stories.

=QA=

New features must be tested by a QA-team or tester before being merged. The tester should not be part of the same sprint team that developed the feature.

=Acceptance tests=

Each new feature should have a folder with acceptance test. The folder name should include the ticket number, like

tests/functional/acceptance/15532-em-warning/

The acceptance tests correspond to the user-stories written in the specification and guarantees that the functionality keeps working as intended even after further changes are applied to the code-base.

TODO: How to organize unit tests for new functionality?

=Release process=



The release cycle consists of two phases:


 * Merge window
 * Feature freeze

During the merge window, new features are accepted into the develop branch.

During the feature freeze, only bug fixes are accepted.

At the end of the feature freeze, the develop branch is merged into master and a new version is released. After that, a new release schedule is written and announced.

Also see current release schedule.

=Useful links=
 * Accessing the source code
 * Coding guidelines
 * How to join the LimeSurvey project team
 * LimeSurvey 1.x navigating the source code
 * LimeSurvey 1.8 database layout documentation (outdated)