[ofbiz-framework] branch trunk 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 trunk 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 trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 0351cdb  Fixed: ListParty doesn't show middleName
0351cdb is described below

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

    Fixed: ListParty doesn't show middleName
   
    (OFBIZ-11681)
   
    added: funtion to retrieve middleName from Person record and append it to the result
---
 .../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 5dbafd1..f93ada1 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
@@ -87,8 +87,12 @@ public class PartyHelper {
                     if (partyValue.getString("firstName") != null) {
                         result.append(", ");
                     }
+                    if (partyValue.getString("middleName") != null) {
+                        result.append(" ");
+                    }
                 }
                 result.append(UtilFormatOut.checkNull(partyValue.getString("firstName")));
+                result.append(UtilFormatOut.checkNull(partyValue.getString("middleName")));
             } else {
                 result.append(UtilFormatOut.ifNotEmpty(partyValue.getString("firstName"), "", " "));
                 result.append(UtilFormatOut.ifNotEmpty(partyValue.getString("middleName"), "", " "));