Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Commit

Permalink
fix company test error, remove log messages, remove comment field on …
Browse files Browse the repository at this point in the history
…ownerparty
  • Loading branch information
hansbak committed Dec 16, 2022
1 parent f9b7196 commit 7b19569
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
1 change: 0 additions & 1 deletion entity/GrowerpViewEntities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ along with this software (see the LICENSE.md file). If not, see
<alias name="ownerPartyId" field="partyId" entity-alias="PTYOWNER"/>
<alias name="ownerDisabled" field="disabled" entity-alias="PTYOWNER"/>
<alias name="ownerCompanyPartyId" field="ownerPartyId" entity-alias="PTYOWNER"/>
<alias name="ownerName" field="comments" entity-alias="PTYOWNER"/>
<alias name="companyFromDate" field="fromDate" entity-alias="TOOWNER"/><!-- date registered in the system -->
<alias name="companyThruDate" field="thruDate" entity-alias="TOOWNER"/>
<alias name="companyPartyId" field="partyId" entity-alias="ORGCOMPANY"/>
Expand Down
23 changes: 9 additions & 14 deletions service/growerp/100/PartyServices100.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,14 @@ along with this software (see the LICENSE.md file). If not, see
</parameter>
</out-parameters>
<actions>
<service-call name="growerp.100.GeneralServices100.get#RelatedCompanyAndOwner"
out-map="relComp"/>
<if condition="!companyPartyId">
<service-call name="growerp.100.GeneralServices100.get#RelatedCompanyAndOwner"
out-map="context"/></if>
<entity-find-one entity-name="growerp.party.CompanyPreferenceAndRole" value-field="org">
<field-map field-name="partyId" from="companyPartyId ?: relComp.companyPartyId"/>
<field-map field-name="partyId" from="companyPartyId"/>
</entity-find-one>
<if condition="!org"><return error="true"
message="Company ${companyPartyId ?: relComp.companyPartyId} not found!"/></if>
message="Company ${companyPartyId} not found!"/></if>
<!-- get primary email address -->
<entity-find entity-name="mantle.party.contact.PartyContactMechInfo"
list="emails" limit="1">
Expand Down Expand Up @@ -294,7 +295,7 @@ along with this software (see the LICENSE.md file). If not, see
<actions>
<service-call out-map="context"
name="growerp.100.GeneralServices100.get#RelatedCompanyAndOwner"/>
<set field="company.partyId" from="ownerPartyId"/>
<set field="company.partyId" from="companyPartyId"/>
<!-- get old values -->
<service-call name="growerp.100.PartyServices100.get#Company" out-map="oldValue"/>
<!-- update name -->
Expand All @@ -308,9 +309,9 @@ along with this software (see the LICENSE.md file). If not, see
for-update="true" list="partyContactMechs" >
<econdition field-name="partyId" from="oldValue.company.partyId"/>
<econdition field-name="contactMechPurposeId" value="EmailPrimary"/>
<econdition field-name="thruDate" operator="is-null"/>
<date-filter/>
</entity-find>
<!-- delete all duplicate mail addresses -->
<!-- deactivate all duplicate mail addresses -->
<iterate list="partyContactMechs" entry="contMech">
<set field="contMech.thruDate" from="ec.user.nowTimestamp"/>
<entity-update value-field="contMech"/>
Expand Down Expand Up @@ -588,7 +589,6 @@ along with this software (see the LICENSE.md file). If not, see
</else-if>
</if>
</if>
<log message="=== user selection group: $userGroupIds role: $companyRole"/>
<entity-find offset="start" limit="limit" list="userInfos"
entity-name="growerp.party.OwnerCompanyPersonAndLoginGroup">
<econdition field-name="ownerPartyId"/>
Expand Down Expand Up @@ -623,7 +623,6 @@ along with this software (see the LICENSE.md file). If not, see
from="disabled" or-null="true" ignore-if-empty="true"/>
<order-by field-name="lastName^,firstName^"/>
</entity-find>
<log message="=======userInfos found ${userInfos?.size()}"/>
<iterate entry="userInfo" list="userInfos">
<!-- payment methods -->
<entity-find entity-name="mantle.account.method.PaymentMethod" list="paymentMethods">
Expand Down Expand Up @@ -713,7 +712,6 @@ along with this software (see the LICENSE.md file). If not, see
</else>
</if>
</iterate>
<log message="========users read: ${user} ${users?.size()}"/>
</actions>
</service>

Expand Down Expand Up @@ -1033,7 +1031,6 @@ along with this software (see the LICENSE.md file). If not, see
</if>
<set field="user.partyId" from="userPartyId"/>
<set field="user.companyPartyId" from="companyPartyId"/>
<log message="====end create user: $user"/>
<service-call name="growerp.100.PartyServices100.get#User"
in-map="[ownerPartyId: relComp.ownerCompanyPartyId, userPartyId: userPartyId]"
out-map="context"/>
Expand Down Expand Up @@ -1512,7 +1509,7 @@ along with this software (see the LICENSE.md file). If not, see
<actions>
<!-- create root party -->
<service-call name="create#mantle.party.Party"
in-map="[partyTypeEnumId: 'PtyOwner', comments: companyName,
in-map="[partyTypeEnumId: 'PtyOwner',
disabled: 'N']"
out-map="owner"/>
<!-- create admin user -->
Expand All @@ -1529,7 +1526,6 @@ along with this software (see the LICENSE.md file). If not, see
in-map="[user: user, password: newPassword,
ownerPartyId: owner.partyId]"
out-map="context"/>
<log message="==== returning from createUser: $user"/>
<!-- company email address -->
<service-call name="mantle.party.ContactServices.create#EmailAddress"
in-map="[emailAddress: companyEmailAddress, partyId: user.companyPartyId,
Expand Down Expand Up @@ -1561,7 +1557,6 @@ along with this software (see the LICENSE.md file). If not, see
<script>ec.user.internalLoginUser(username)</script>
<!-- load demo data -->
<if condition="demoData == 'true'">
<log message="=====calling demo data with userPartyId: ${user.partyId}"/>
<service-call name="growerp.100.PartyServices100.load#DefaultData"
in-map="[companyPartyId: user.companyPartyId,
currencyId: currencyId,
Expand Down

0 comments on commit 7b19569

Please sign in to comment.