Wiki cleanup in progress: If you're having trouble finding something, read these tips.

Patches

Who Can Submit Patches

We welcome any and all patch contributions. Patches can range from spelling and grammar fixes to bug fixes and minor new features. (Major new features should be developed in a branch and be committed on a bit-by-bit basis. Instructions for requesting your own branch)

Where to Submit Patches

  • Patches should be submitted to developers by attaching a patch file to a ticket in JIRA.
  • If your patch is not addressing an existing OpenMRS ticket, then first search for an existing ticket and ask within the forum or mailing lists before creating a new ticket. If you cannot find an existing ticket and the folks in the developers mailing list have recommended that you make a new ticket, then you'll need to create a new ticket.
  • Attach your patch to the ticket along with a description of your patch.
  • If you have been talking with a developer about a certain issue and/or feature, assign the patch ticket to that developer. If you are not sure who to assign the ticket to, assign it to the patch manager (see explanation below).

How to Create Patches

  • A patch file is simply a text diff (delta) between the latest working copy and your changes. It can contain multiple files.
  • Patch files can be created with your subversion tool of choice – both Subclipse and TortoiseSVN have "Create Patch" options. Right click on the highest parent folder (usually root) to create one big patch file.
    1. Save the patch to a file with the extension of .patch (not *.txt or *.patch.txt)
    2. Upload your .patch file as an attachment within the appropriate ticket on the ticketing site (JIRA).

Patch Manager

The patch manager is a person that prevents any potential code contributions from falling through the cracks. The role of the manager is to follow up on patch tickets that have not been closed and to assign developers to review and/or apply patches that have been submitted.
The current patch manager is [Ben Wolfe] (bwolfe).
See the JIRA report showing all submitted patches: http://tickets.openmrs.org/secure/IssueNavigator.jspa?mode=hide&requestId=10072

How to Apply Patches

  1. [Code Review] the ticket to make sure it fits up to OpenMRS standards.
  2. Download the patch file from the corresponding JIRA ticket.
  3. SVN Checkout/Update the trunk branch (backports to a specific version branch will follow the same procedure).
  4. Apply the patch to your checked out copy of the trunk branch.
  5. Apply changes (if needed) from any Code Review notes for this particular patch.
  6. [archive:In Eclipse] Right-click on the project and select the "Compare with ... Base Revision" option.
  7. Review all differences as a sanity check that all files are included and all changes are correct.
  8. SVN Commit the changes, with a commit message that includes the ticket id, patch author and a short description of the patch. See [Subversion_Repository_Code_of_Conduct#Commit_Comments]
  9. Resolve the ticket as Committed - Close.

Sample commit message

Sample closed ticket comment

Internet Resources

Labels

cleanup cleanup Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.