Updating the iDempiere Core

The purpose of this lesson is to help you update the core code and either (1) submit fixes to the iDempiere core codebase or (2) make your changes available to others through custom created binaries.

Modifying Core iDempiere - Introduction

Contribute Changes to iDempiere Core Development Team

Text from Slide:
  1. Create a iDempiere Jira ticket
  2. Discuss the design via the forum or weekly meeting
  3. Create a clean development environment (code and db)
  4. Create a patch
  5. Make your changes (migration)
  6. Make your changes (code)
  7. Create a new System and TEST, TEST, TEST
  8. Update your Jira Ticket with your attachments
  9. Notify the developers the modifications are ready
Links:

Distribute Changes to Your Organization or Customer

Text from Slide:
  1. Make your database changes
  2. Pack Out (2Pack) changes
  3. All code goes in a plugin if possible
  4. Create new iDempiere repo/build if necessary
  5. Export plugin/feature
  6. Test deployment on backup server
  7. Deploy plugin to customer’s server
  8. Deploy Pack In (2Pack) - note can be combined

Log Migration Scripts

Text from Slide: Links:

Create Model Changes - Model Generator

Creating and Submitting a Code Patch

This section assumes you have created your development environment, and you have the intent to modify code to fix an issue. Patch is a Mercurial (hg) concept. To learn more about creating and managing patches read this chapter This is a useful online book. I recommend you bookmark it. Before you begin. Create or update your .hgrc home directory file to enable Mercurial Queues.
[ui]
username = Your Name <name@url.com>

[extensions]
hgext.mq =
use the following commands to help you create your patch.
# prepare your repository
hg qinit 

# create a new patch - done before your first change
hg qnew name-of-your-patch.patch

# Modify the core code and create a new save point for your patch
hg qrefresh (creates a save point)

# Give the current active patch a comment
hg qrefresh -m "commit message"

# Make the patch a permanent commit
hg qfinish name-of-your-patch.patch
If you have made uncommitted changes, the hg qnew will initialize the patch and automatically incorporate your uncommitted changes without needing to enter hg qrefresh. Register for Jira, iDempiere's bug tracking tool. You do not need permission to perform this task. Created an issue. Attached your patch file (name-of-your-patch.patch) created from above process. Your patch file will be located in the .hg/patches directory inside your repository.

Testing Your Patch

You should test your patch before submit your code. The following commands will help you test. Remove all patches if any already exist:
hg qpop -a
Import your newly created patch:
hg import --no-commit name-of-your-patch.patch

Submitting Application Dictionary Changes to iDempiere's Core

The official way to offer application dictionary changes is by using migration scripts. Here are two links to help you get started:

2014-08-12 AM Building iDempiere Core Code from Eclipse and Jenkins