Adam,
Thanks for the details and the quick response.

Chandi - revision 12801 should reflect the change that Adam describes to
ant build_db if you get a chance to try it out today.  Thanks for
discovering this issue!

Jeff



-----Original Message-----
From: Adam Monsen [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 21, 2008 5:44 PM
To: Jeff Brewster
Cc: Chandi Datta; mifos-functional@lists.sourceforge.net
Subject: Re: CoA customization question

First, I just wanted to say that I know the Chart of Accounts config
is currently a complex and error-prone process. But it really should
work! If it doesn't, we'll fix it.

Second, thank you for the detailed report of what's happening! You and
Chandi followed the given instructions to the letter as far as I can
tell.

On Fri, Apr 18, 2008 at 10:42 AM, Jeff Brewster wrote:
> I have a question based on the behavior Chandi and I encounter with
the
> Chart of Accounts customization.  It appears that the default values
for
> GL account codes still get loaded in the database whether or not they
> are listed in the custom configuration file.

Yes, you're right; I think you guys found a design flaw.

> Is the custom file meant to update the default settings

Yes,

> or modify and supplement the default CoA settings?

Bear with me, I think I need to start at the beginning to answer this
question.

If you start Mifos without a custom CoA the first time, the default is
written to the database.

If you start Mifos with a custom CoA the first time, your custom CoA is
written to the database.

Mifos never reads the default CoA on subsequent startups; you must use a
custom CoA if you want to change names of existing general ledger
accounts or add new accounts.

Unfortunately, there is one big caveat I mentioned here:
http://article.gmane.org/gmane.comp.finance.mifos.devel/4457

It's buried in a bunch of other noise, so I'll try to clarify what's
going on here.

Running "ant build_db" actually starts the Mifos application (to update
the default password for the "mifos" user), one side effect of which is
the CoA is loaded by FinancialInitializer. Whoops! This means that a
*different* classpath is used than the app server's, so your custom CoA
is ignored, and the default is loaded. From this point forward, you are
limited in what you can do with the custom CoA as noted above.

"ant build_db" is definitely the best way to initialize a production
database, but using this target is where we run into problems setting up
a custom CoA.

When I said "start mifos" above (and in the docs on the wiki) I
incorrectly assumed that production setups would not involve the use of
"ant build_db", which effectively starts Mifos.

Anyway, I believe a code change, albeit small, will be necessary to make
the CoA configuration process a bit more robust. I think we can use a
simpler process than what we do in UpdateMifosPassword to update the
default admin user's password. Instead of starting the application and
setting the password that way, it can just be in an SQL script that is
only called by "ant build_db". This would most likely be easier than
modifying FinancialInitializer further, and has the added side benefit
of speeding up the "build_db" target. I'll be in IRC if anyone wants to
chat about this, and I'll probably start a thread on the developer list.

-- 
Adam Monsen


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Mifos-functional mailing list
Mifos-functional@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mifos-functional

Reply via email to