Skip to content

Commit

Permalink
Improved: Marital Status not managed properly in Person entity.
Browse files Browse the repository at this point in the history
(OFBIZ-10921)
Thanks Paul, Jacques, Pierre and Nicolas for you suggestions and discussions.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858261 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
surajkhurana committed Apr 27, 2019
1 parent 3993d23 commit 8436ca3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
4 changes: 4 additions & 0 deletions applications/datamodel/data/seed/PartySeedData.xml
Expand Up @@ -135,6 +135,10 @@ under the License.
<Enumeration description="Student" enumCode="STUDENT" enumId="EMPS_STUDENT" sequenceId="06" enumTypeId="EMPLOY_STTS"/>
<Enumeration description="Unemployed" enumCode="UNEMP" enumId="EMPS_UNEMP" sequenceId="07" enumTypeId="EMPLOY_STTS"/>

<EnumerationType enumTypeId="MARITAL_STATUS" description="Marital Status"/>
<Enumeration description="Single" enumId="SINGLE" sequenceId="01" enumTypeId="MARITAL_STATUS" enumName="Single"/>
<Enumeration description="Married" enumId="MARRIED" sequenceId="02" enumTypeId="MARITAL_STATUS" enumName="Married"/>

<EnumerationType description="Residence Status" enumTypeId="PTY_RESID_STTS" hasTable="N"/>
<Enumeration description="Own Home" enumCode="OWN" enumId="PRESS_OWN" sequenceId="01" enumTypeId="PTY_RESID_STTS"/>
<Enumeration description="Private Tenant" enumCode="PVT_TENANT" enumId="PRESS_PVT_TENANT" sequenceId="02" enumTypeId="PTY_RESID_STTS"/>
Expand Down
6 changes: 5 additions & 1 deletion applications/datamodel/entitydef/party-entitymodel.xml
Expand Up @@ -2794,7 +2794,8 @@ under the License.
<field name="height" type="floating-point"></field>
<field name="weight" type="floating-point"></field>
<field name="mothersMaidenName" type="long-varchar" encrypt="true"></field>
<field name="maritalStatus" type="indicator"></field>
<field name="oldMaritalStatus" type="indicator" col-name="MARITAL_STATUS"><description>Deprecated since branch release: use martialStatusEnumId</description></field>
<field name="maritalStatusEnumId" type="id"/>
<field name="socialSecurityNumber" type="long-varchar" encrypt="true"></field>
<field name="passportNumber" type="long-varchar" encrypt="true"></field>
<field name="passportExpireDate" type="date"></field>
Expand All @@ -2817,6 +2818,9 @@ under the License.
<relation type="one" fk-name="PERSON_RESS_ENUM" title="ResidenceStatus" rel-entity-name="Enumeration">
<key-map field-name="residenceStatusEnumId" rel-field-name="enumId"/>
</relation>
<relation type="one" fk-name="PERSON_MARITAL" title="MaritalStatus" rel-entity-name="Enumeration">
<key-map field-name="maritalStatusEnumId" rel-field-name="enumId"/>
</relation>
<index name="FIRST_NAME_IDX">
<index-field name="firstName"/>
</index>
Expand Down
2 changes: 1 addition & 1 deletion applications/party/minilang/party/PartyMapProcs.xml
Expand Up @@ -39,7 +39,7 @@ under the License.
<process field="height"><convert type="Double"><fail-property resource="PartyUiLabels" property="PartyHeightNotValidNumber"/></convert></process>
<process field="weight"><convert type="Double"><fail-property resource="PartyUiLabels" property="PartyWeightNotValidNumber"/></convert></process>
<process field="mothersMaidenName"><copy/></process>
<process field="maritalStatus"><copy/></process>
<process field="maritalStatusEnumId"><copy/></process>
<process field="socialSecurityNumber"><copy/></process>
<process field="passportNumber"><copy/></process>
<process field="passportExpireDate"><convert type="Date"><fail-property resource="PartyUiLabels" property="PartyPassportExpireDateNotValidDate"/></convert></process>
Expand Down
11 changes: 5 additions & 6 deletions applications/party/widget/partymgr/PartyForms.xml
Expand Up @@ -202,13 +202,12 @@ under the License.
<option key="F" description="${uiLabelMap.CommonFemale}"/>
</drop-down>
</field>
<field name="maritalStatus">
<field name="maritalStatusEnumId">
<drop-down allow-empty="true">
<option key="S" description="${uiLabelMap.PartyMaritalStatusSingle}"/>
<option key="M" description="${uiLabelMap.PartyMaritalStatusMarried}"/>
<option key="P" description="${uiLabelMap.PartyMaritalStatusSeparated}"/>
<option key="D" description="${uiLabelMap.PartyMaritalStatusDivorced}"/>
<option key="W" description="${uiLabelMap.PartyMaritalStatusWidowed}"/>
<entity-options entity-name="Enumeration" key-field-name="enumId" description="${description} [${enumCode}]">
<entity-constraint name="enumTypeId" value="MARITAL_STATUS"/>
<entity-order-by field-name="sequenceId"/>
</entity-options>
</drop-down>
</field>
<field name="employmentStatusEnumId">
Expand Down

0 comments on commit 8436ca3

Please sign in to comment.