[ 
https://issues.apache.org/jira/browse/OFBIZ-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730859#action_12730859
 ] 

Sumit Pandit commented on OFBIZ-2720:
-------------------------------------

Above patch contains the service to Create a database upgrade that sets the 
statusId to "Approved" to all the records with statusId set to null.
When run this service it should keep in mind that no ECA should triggered.
To make sure this, following should perform -
1) in file - 
/Users/sumitpandit/work/project/ofbiz_dev/testing/applications/accounting/entitydef/eecas.xml
 comment - 
        <eca entity="FinAccountTrans" operation="create-store" event="return">
            <action service="updateFinAccountBalancesFromTrans" mode="sync"/>
       </eca>
Above will resist triggering of a service updateFinAccountBalancesFromTrans, 
when changes are perform in Entity - FinAccountTrans.



> Add statusId field to the FinAccountTrans entity and verify that existing 
> functionality is not broken.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-2720
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2720
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: accounting
>    Affects Versions: SVN trunk
>            Reporter: Sumit Pandit
>             Fix For: SVN trunk
>
>         Attachments: AddedStatusIdToFinAccountTrans.patch, 
> AddedStatusIdToFinAccountTrans.patch
>
>
> A) Add statusId field to the FinAccountTrans entity.
> B) Seed data: "Created", "Approved".
> C) Create a database upgrade script that sets the statusId to "Approved" to 
> all the records with statusId set to null, no ECA should be triggered when 
> this update is done.
> D) Verify that all the existing code that is using the FinAccountTrans entity 
> works fine; the idea is that if there is code that:
> 1) creates new FinAccountTrans records, then it should create them in the 
> "Approved" status
> 2) if there are accounting transactions posted when FinAccountTrans records 
> are created/updated, this should now happen only when the status is "Approved"
> Thanks Jacopo for the Guidance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to