[ofbiz-framework] branch release18.12 updated: Fixed: ListParty doesn't show middleName

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch release18.12 updated: Fixed: ListParty doesn't show middleName

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release18.12 by this push:
     new 10e9d38  Fixed: ListParty doesn't show middleName
10e9d38 is described below

commit 10e9d3809de0cfd2d8c8e9fac9ade3531b35bc50
Author: Pierre Smits <[hidden email]>
AuthorDate: Sat May 9 12:04:04 2020 +0200

    Fixed: ListParty doesn't show middleName
   
    (OFBIZ-11681)
   
    Fixes a logic error
---
 .../party/src/main/java/org/apache/ofbiz/party/party/PartyHelper.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyHelper.java b/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyHelper.java
index 1d2c41c..9605c66 100644
--- a/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyHelper.java
+++ b/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyHelper.java
@@ -89,6 +89,10 @@ public class PartyHelper {
                     }
                 }
                 result.append(UtilFormatOut.checkNull(partyValue.getString("firstName")));
+                if (partyValue.getString("middleName") != null) {
+                    result.append(" ");
+                }
+                result.append(UtilFormatOut.checkNull(partyValue.getString("middleName")));
             } else {
                 result.append(UtilFormatOut.ifNotEmpty(partyValue.getString("firstName"), "", " "));
                 result.append(UtilFormatOut.ifNotEmpty(partyValue.getString("middleName"), "", " "));