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

Jakub Sławiński edited comment on MIFOS-4795 at 2/27/12 1:00 AM:
-----------------------------------------------------------------

I rejected the patch, because it is too complicated. Moreover, the spaghetti 
code is wrong.

The proper fix looks like this (only the preview method from EditStatusAction 
needed to be changed):

+        String newStatusName = null;
+        if (StringUtils.isNotBlank(editStatusActionForm.getNewStatusId())) {
+            newStatusName = new 
AccountBusinessService().getStatusName(AccountState.fromShort(getShortValue(editStatusActionForm.getNewStatusId())),
 accountBO.getType());
+        }
+        SessionUtils.setAttribute(SavingsConstants.NEW_STATUS_NAME, 
newStatusName, request);
+
                
      was (Author: jslawinski):
    I rejected the patch, because it is too complicated. Moreover, the 
spaghetti code is wrong.

The proper fix looks like this (only the load method from EditStatusAction 
needed to be changed):

+        String newStatusName = null;
+        if (StringUtils.isNotBlank(editStatusActionForm.getNewStatusId())) {
+            newStatusName = new 
AccountBusinessService().getStatusName(AccountState.fromShort(getShortValue(editStatusActionForm.getNewStatusId())),
 accountBO.getType());
+        }
+        SessionUtils.setAttribute(SavingsConstants.NEW_STATUS_NAME, 
newStatusName, request);
+
                  
> status text missing during approve loan flow preview step
> ---------------------------------------------------------
>
>                 Key: MIFOS-4795
>                 URL: http://mifosforge.jira.com/browse/MIFOS-4795
>             Project: mifos
>          Issue Type: Bug
>          Components: Loan Account
>         Environment: head/master 85c7004926a856187bbd62fb9fdf17f83407bd14
>            Reporter: Adam Monsen
>            Assignee: Jakub Sławiński
>              Labels: Status
>             Fix For: Release H
>
>         Attachments: stat_msg.patch, status.png
>
>
> h1. Repro
> # create a new loan for a client
> # click "Edit account status" on loan dashboard (note current status, likely 
> "Application Pending Approval" to the right of a yellow square)
> # select "Application Approved" radio button, enter any note, click "Preview"
> h1. Expected
> Text "Application Approved" appears to the right of the words "New Status: " 
> and the green square.
> h1. Actual
> "New status:" and green square appear, but "Application Approved" text is 
> missing.
> h1. Additional information
> * change_status_preview.jsp
> * EditStatusAction.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
http://mifosforge.jira.com/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues

Reply via email to