[ 
http://mifosforge.jira.com/browse/MIFOS-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=64229#action_64229
 ] 

Udai Gupta commented on MIFOS-2938:
-----------------------------------

Patch rejected, the discussion took place on IRC after which no improvements 
were made.

{quote}
2011-01-12T01:00(PST)  <Raghav> I created a class called ClientInfoDto for 
validating duplicate client in first page of creation of client
2011-01-12T01:00(PST)  <Raghav> Do i need to write any test for that class?
2011-01-12T01:29(PST)  <Raghav> I have created a class ClientInfoDto for 
validating duplicate client in first page of client creation and for this do i 
have to write any test for this?
2011-01-12T01:37(PST)  <ugupta> Raghav: DTOs are "Data transfer Objects" I 
don't understand what you mean when you say you have "created a ClientInfoDto 
for validation of duplicate client"
2011-01-12T01:38(PST)  <ugupta> I think there is already ClientInfoDto in Mifos 
code
2011-01-12T01:38(PST)  <Raghav> Please see the Issue Mifos-2938, i attached a 
patch there, so that u will get full information
2011-01-12T01:39(PST)  <Raghav> I have written that class
2011-01-12T01:44(PST)  <ugupta> There must be an existing client creation 
acceptance test
2011-01-12T01:44(PST)  <ugupta> so you can just add one more test case in that 
for duplicate name validation
2011-01-12T01:46(PST)  <Raghav> ClientCreationTest class is there but its a 
unit test
2011-01-12T02:14(PST)  <Raghav> ugupta: have u seen that patch
2011-01-12T02:14(PST)  <Raghav> ?
2011-01-12T02:50(PST)  <ugupta> I looked briefly at the patch to understand the 
context
2011-01-12T02:55(PST)  <ugupta> You can use 
org.mifos.dto.domain.ClientCreationDetail instead of creating a new for just 
two properties, or replace the two properties in 
org.mifos.dto.domain.ClientCreationDetail with your ClientInfoDto
2011-01-12T02:57(PST)  <ugupta1> Raghav: You have created 
validateClientForDuplicateName Dao method, while you should use existing 
validateClientForDuplicateNameOrGovtId Dao method
2011-01-12T03:58(PST)  <Raghav> one problem in ClientCreationDetail  is it has 
only final variables
2011-01-12T03:58(PST)  <Raghav> if i want to create a constructor for 2 
variables it won't allow
2011-01-12T04:13(PST)  <ugupta> Raghav: instead of creating another 
constructor, you should use the same constructor, You should be able to use 
same ClientCreationDetail as it will be filled by Controller and then passed to 
service layer, and then you should be able use same validation using 
validateClientForDuplicateNameOrGovtId(ClientBO)
2011-01-12T04:14(PST)  <ugupta> Raghav: you need to invoke the validation 
before preview page, so it seems like there is already everything there in the 
code, but you have to move the validation to before preview page
2011-01-12T04:17(PST)  <ugupta> It may be possible that before preview page 
there is no service call is being taking place, so you can divide the service 
call in two parts
2011-01-12T04:17(PST)  <ugupta> validation -> preview -> submit -> validation 
(duplicateCheck) -> save
2011-01-12T04:18(PST)  <ugupta> form-> validation(duplicateCheck) -> preview -> 
submit -> validation (duplicateCheck) -> save
2011-01-12T04:18(PST)  <Raghav> Ok
2011-01-12T04:25(PST)  <Raghav> Udai: Can you tell me in detail i am not 
understanding
2011-01-12T04:27(PST)  <ugupta> current state of client creation is  form -> 
basic parameter validation (does not validate for duplicate client) -> preview 
-> submit -> validation (validateDuplicateClient) -> save
2011-01-12T04:27(PST)  <ugupta> you have to change it to  form -> basic 
parameter validation (does not validate for duplicate client) -> preview -> 
submit -> validation (validateDuplicateClient) -> save
2011-01-12T04:27(PST)  <ugupta1> I mean  form -> basic parameter validation 
(validateDuplicateClient) -> preview -> submit -> validation 
(validateDuplicateClient) -> save
2011-01-12T04:28(PST)  <ugupta1> Current state
2011-01-12T04:28(PST)  <ugupta1> 1. User goes to client creation form
2011-01-12T04:28(PST)  <ugupta1> 2. enters detail and click preview button
2011-01-12T04:29(PST)  <ugupta1> 3. server side validate parameters for null 
and other basic validation, but not for duplicate client
2011-01-12T04:30(PST)  <ugupta1> 4. User gets Preview page and verify if 
details are correct and click submit
2011-01-12T04:30(PST)  <ugupta1> 5. validation for client creation takes place 
at server side including duplicate client validation and then saves if 
everything is correct
2011-01-12T04:31(PST)  <ugupta1> you have to add the validation of duplicate 
client at the 3 step
2011-01-12T04:31(PST)  <ugupta1> 1. User goes to client creation form
2011-01-12T04:31(PST)  <ugupta1> 2. enters detail and click preview button
2011-01-12T04:31(PST)  <ugupta1> 3. server side validate parameters for null 
and other basic validation and validate for duplicate client
2011-01-12T04:31(PST)  <ugupta1> 4. User gets Preview page and verify if 
details are correct and click submit
2011-01-12T04:31(PST)  <ugupta1> 5. validation for client creation takes place 
at server side including duplicate client validation and then saves if 
everything is correct
2011-01-12T04:32(PST)  <ugupta1> My point is, validation exist at step 5 
currently you would have to invoke it at step 3 also
2011-01-12T04:34(PST)  <Raghav> Udai:Ok thanks
2011-01-12T04:35(PST)  <ugupta1> Avoid creating extra code, reuse what already 
exists
{quote}

> Duplicate client check should run on first page of client application workflow
> ------------------------------------------------------------------------------
>
>                 Key: MIFOS-2938
>                 URL: http://mifosforge.jira.com/browse/MIFOS-2938
>             Project: mifos
>          Issue Type: Improvement
>          Components: Clients
>    Affects Versions: Release 1.5.0.1
>            Reporter: Ryan Whitney
>            Assignee: mifosdeveloperqueue
>             Fix For: Mifos Backlog
>
>         Attachments: 0001-Mifos-2938-Duplicate-Client-Check-Validation.patch
>
>
> Currently Mifos checks for duplicate clients after the person submits the 
> application for approval.  Mifos should check for the duplicate account after 
> submitting the first page of the workflow
> on Mifos demo server (as name + dob check is broken on shamim D)
> REPRO:
> 1. Find an existing client and note first name, last name and DOB
> 2. Select create a new client
> 3. On first page of client  enter name + dob of selected existing client
> 4. Click on Continue button
> EXPECTED:
> Mifos displays error saying that client already exists
> ACTUAL:
> User goes through all steps of client application before clicking on "Submit 
> for Approval" when the error displays.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mifosforge.jira.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues

Reply via email to