There are several ways in which you can contribute to the Liferay open-source project. Some examples include:
- Write documentation in the wiki for a particular feature you know
- Report bugs you find while testing and using Liferay
- Implement a new feature or extend the existing ones
- Fix a bug
- Suggest a new feature
Write documentation #
Liferay has both an official documentation and a community based documentation created through a wiki (right where this page is).
To contribute to the wiki, please register for an account and then create articles using the following guidelines.
Report bugs #
Liferay uses Atlassian JIRA issue tracking system - http://issues.liferay.com. Anyone can register for an account and easily report bugs to help improve the overall stability of the product. Please follow these JIRA guidelines when reporting a bug: JIRA Wiki. Following these standards will help JIRA stay clutter-free and up-to-date so legitimate bugs can be quickly addressed. The JIRA wiki also explains how to register for a JIRA account and describes each data field in detail.
Some important take-aways from the JIRA wiki:
- Make sure it really is a bug - Questions are best handled in the community forums. If you are unsure if it's a bug, post in the forums and see if anyone else is having the same problem
- Provide as much detail as possible, including detailed steps on how to reproduce the bug. Also include a note outlining the intended results from performing the steps - How would it work if the bug did not exist?
- Search existing issues before posting a new one. The bug you encountered may have already been reported.
Implement a new feature #
- Make sure the feature does not exist
- Consider discussing the proposed new feature in the forums to allow others to give their opinion and give suggestions
- Create a "New Feature" or "Improvement" issue in JIRA issue tracking system. This will be the primary location to interact with Liferay developers and finally submit your new feature for review.
- Download Liferay's latest sources from the GitHub repositories
- Submit a Git pull request to the Liferay module owner (preferred) or attach a patch file to the JIRA issue you created earlier.
- Make sure your contribution satisfies Liferay's development guidelines: Liferay Core Development Guidelines.
- Finally, click the "Contribute Solution" workflow step in the left-hand navigation of the ticket and accept the Contributor's Agreement. There will be a place to paste a link to the Git pull request if you used Git to submit your code.
Now, wait to hear from Liferay regarding your contribution. It is not uncommon for a Liferay developer to ask questions, suggest additional improvements or attempt to fix a possible problem with portion of the contribution. This is completely normal. Interact with the developer and work to find a suitable solution. Undoubtedly, Liferay is thrilled with community contributions and wants to see them integrated into the product.
- It's much easier for Liferay's developers to receive several small patches than a huge one, because the latter takes more time to review.
- Follow the conventions of the existing code as strictly as you can: pay attention to class names, variable names and all the coding style.
- If you are planning to develop a large feature or send a set of related patches it's a good idea to:
- Document your idea on the Ideas Dashboard
- Begin a discussion thread on the Suggestions and Feature Requests forum
- Follow up with the responsible core engineer assigned to that area
Fix a bug #
Similar to implementing a new feature, community members are encouraged to contribute fixes for bugs. Follow these steps to fix a bug you have discovered:
- Login to issues.liferay.com, and click Issues->Create Issue in the top menu.
- Fill in relevant fields as described in the above "File a bug" section, and click Create Issue.
- Follow the steps outlined in Contribute using Git and GitHub to set up your clone of the liferay-portal repository.
- Make your code changes, and test thoroughly. All code fixes must first be implemented and tested on the 'master' branch of the liferay-portal Git repository. This will ensure that your bugfix will appear in all future releases. Liferay staff will backport the bug if relevant to earlier releases.
- Once you code changes are complete and pushed to your Git clone, you are ready to issue a Git Pull Request. You should not issue Pull Requests against the master liferay-portal or liferay-plugins repository. Instead, determine who the component lead is for the component in which the bug exists, and issue your pull request to that relevant engineer. A list of component leads can be found on the Components page for the LPS JIRA project. To determine the relevant component lead's Github repository against which you should file your pull request, see the List of Contributors to the liferay-portal git repository.
- Issue your pull request against the appropriate lead's git repository clone.
- On the JIRA ticket, click Workflow->Contribute Solution, and fill in the URL to your pull request, along with any other supporting information.
At this point, the component lead will see your pull request and work with you (either in JIRA comments, or in Github comments) to ensure your fix is clean and ready for integration. After responding to any issues, your code will be committed and the bug will be marked appropriately to move it into the QA queue for final verification. You should no longer need to update the JIRA ticket and can rest assured your contribution is highly valued and will be acted upon in a timely manner!