[ 
https://issues.apache.org/jira/browse/FINERACT-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15397388#comment-15397388
 ] 

ASF GitHub Bot commented on FINERACT-46:
----------------------------------------

Github user nazeer1100126 commented on a diff in the pull request:

    https://github.com/apache/incubator-fineract/pull/170#discussion_r72602036
  
    --- Diff: 
fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffWritePlatformServiceJpaRepositoryImpl.java
 ---
    @@ -91,6 +92,17 @@ public CommandProcessingResult updateStaff(final Long 
staffId, final JsonCommand
     
                 final Staff staffForUpdate = 
this.staffRepository.findOne(staffId);
                 if (staffForUpdate == null) { throw new 
StaffNotFoundException(staffId); }
    +            
    +            final boolean isActive = 
command.booleanPrimitiveValueOfParameterNamed("isActive");
    +            
    +            if(staffForUpdate.isActive() && !isActive) {
    +                final boolean isAnyActiveEntityAssociatedWithStaff = 
this.staffRepository.
    --- End diff --
    
    Use StaffReadPlatformService instead of repository


> Throw an exception if staff to be deactivated is attached to an entity with 
> status enum id not equal to 600
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: FINERACT-46
>                 URL: https://issues.apache.org/jira/browse/FINERACT-46
>             Project: Apache Fineract
>          Issue Type: Improvement
>            Reporter: Emmanuel Nnaa
>            Assignee: Markus Geiss
>
> Throw an exception if staff to be deactivated is attached to an entity with 
> status enum id not equal to 600.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to