Unable to transfer group between branches with center hierarchy turned off

Description

Repro:
1. In applicationConfiguration.custom.properties turn off centers by including:
ClientRules.CenterHierarchyExists=false.
2. For this example assume a clean database with two branches (database dump in attachment).
3. Create "group1" in BranchA.
4. Create "group2" in BranchB.
5. Create "client in group1" in group1.
6. From the group details page use "Edit office membership" to move group1 to BranchB.

Expected result:
Group can be successfully moved to BranchB.

Actual result:
Page with stack trace appears (see attached file: error.txt).

This issue is related to MIFOS-4936.

Environment

None

Activity

Show:
Van Mittal-Henkle
May 9, 2011, 7:29 PM
Edited

Root cause has been identified. The hibernate session was being flushed and cleared where it should have only been flushed.

Mifos Hudson Jira Plugin User
May 9, 2011, 10:33 PM

Integrated in

head-f-release #165
MIFOS-4965. Changed call to flush and clear session to just flush the session.
MIFOS-4965. Added test shouldTransferGroupFromOfficeToOffice to demonstrate the issue and fix.
MIFOS-4965. Moved other usage of hibernateTransactionHelper.flushAndClearSession to flushSession where it seemed appropriate.

Van Mittal-Henkle : a44ce1bf3a8ef9edfc8b602c72930b486de3d431
Files :

  • appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java

  • appdomain/src/main/java/org/mifos/framework/hibernate/helper/HibernateTransactionHelper.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/PersonnelServiceFacadeWebTier.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/SavingsServiceFacadeWebTier.java

  • appdomain/src/main/java/org/mifos/framework/hibernate/helper/HibernateTransactionHelperForStaticHibernateUtil.java

  • appdomain/src/main/java/org/mifos/customers/office/business/service/OfficeHierarchyServiceImpl.java

  • appdomain/src/main/java/org/mifos/customers/business/service/CustomerServiceImpl.java

  • application/src/test/java/org/mifos/application/servicefacade/GroupServiceFacadeWebTierIntegrationTest.java

Van Mittal-Henkle : f18f56542ae5ef8e502bef124fd0336b9ac4384a
Files :

  • application/src/test/java/org/mifos/application/servicefacade/GroupServiceFacadeWebTierIntegrationTest.java

Van Mittal-Henkle : 9937435a3858b5ecc8d9ea6bcdbb23fb05228185
Files :

  • appdomain/src/main/java/org/mifos/application/servicefacade/SavingsServiceFacadeWebTier.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/PersonnelServiceFacadeWebTier.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java

  • application/src/test/java/org/mifos/customers/business/service/CenterStatusChangeIntegrationTest.java

  • appdomain/src/main/java/org/mifos/customers/business/service/CustomerServiceImpl.java

Lukasz Chudy
May 10, 2011, 10:10 AM

Verified on 10.05.2011
Bug has been fixed properly.

This bug occurs also in G Release. New issue has been created for that

Mifos Hudson Jira Plugin User
June 8, 2011, 7:57 PM

Integrated in

head-g-release-secondary #71
MIFOS-4965. Changed call to flush and clear session to just flush the session.
MIFOS-4965. Added test shouldTransferGroupFromOfficeToOffice to demonstrate the issue and fix.
MIFOS-4965. Moved other usage of hibernateTransactionHelper.flushAndClearSession to flushSession where it seemed appropriate.

Van Mittal-Henkle :
Files :

  • appdomain/src/main/java/org/mifos/customers/office/business/service/OfficeHierarchyServiceImpl.java

  • appdomain/src/main/java/org/mifos/framework/hibernate/helper/HibernateTransactionHelper.java

  • appdomain/src/main/java/org/mifos/framework/hibernate/helper/HibernateTransactionHelperForStaticHibernateUtil.java

  • appdomain/src/main/java/org/mifos/customers/business/service/CustomerServiceImpl.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/PersonnelServiceFacadeWebTier.java

  • application/src/test/java/org/mifos/application/servicefacade/GroupServiceFacadeWebTierIntegrationTest.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/SavingsServiceFacadeWebTier.java

Van Mittal-Henkle :
Files :

  • application/src/test/java/org/mifos/application/servicefacade/GroupServiceFacadeWebTierIntegrationTest.java

Van Mittal-Henkle :
Files :

  • application/src/test/java/org/mifos/customers/business/service/CenterStatusChangeIntegrationTest.java

  • appdomain/src/main/java/org/mifos/customers/business/service/CustomerServiceImpl.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/SavingsServiceFacadeWebTier.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/PersonnelServiceFacadeWebTier.java

Mifos Hudson Jira Plugin User
June 8, 2011, 11:27 PM

Integrated in

head-master-secondary #442
MIFOS-4965. Changed call to flush and clear session to just flush the session.
MIFOS-4965. Added test shouldTransferGroupFromOfficeToOffice to demonstrate the issue and fix.
MIFOS-4965. Moved other usage of hibernateTransactionHelper.flushAndClearSession to flushSession where it seemed appropriate.

Van Mittal-Henkle :
Files :

  • application/src/test/java/org/mifos/application/servicefacade/GroupServiceFacadeWebTierIntegrationTest.java

  • appdomain/src/main/java/org/mifos/customers/business/service/CustomerServiceImpl.java

  • appdomain/src/main/java/org/mifos/framework/hibernate/helper/HibernateTransactionHelper.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/SavingsServiceFacadeWebTier.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/PersonnelServiceFacadeWebTier.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java

  • appdomain/src/main/java/org/mifos/framework/hibernate/helper/HibernateTransactionHelperForStaticHibernateUtil.java

  • appdomain/src/main/java/org/mifos/customers/office/business/service/OfficeHierarchyServiceImpl.java

Van Mittal-Henkle :
Files :

  • application/src/test/java/org/mifos/application/servicefacade/GroupServiceFacadeWebTierIntegrationTest.java

Van Mittal-Henkle :
Files :

  • appdomain/src/main/java/org/mifos/customers/business/service/CustomerServiceImpl.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/SavingsServiceFacadeWebTier.java

  • application/src/test/java/org/mifos/customers/business/service/CenterStatusChangeIntegrationTest.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/PersonnelServiceFacadeWebTier.java

  • appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java

Fixed

Assignee

mifosqa

Reporter

Lukasz Chudy

Labels

None

URL

None

Story Points

None

Team

Core

Scheduled For

None

Epic

None

Notify

None

productboard URL

None

Man Day Estimate

None

Components

Fix versions

Affects versions

Priority

Major
Configure