This is an automated email from the ASF dual-hosted git repository. adityasharma pushed a commit to branch release17.12 in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release17.12 by this push: new ca62bd6 Fixed: Unable to create event in SFA component (OFBIZ-9901) When creating event for the party other than the loggedin user, the party should be in CAL_OWNER role to be added to event. Added appropriate check in service along with the error message. Thanks Rubia Elza Joshep for reporting the issue and Aditi Patidar for providing the patch ca62bd6 is described below commit ca62bd6cef357d33f6770fd7e693e3dd97630525 Author: Aditya Sharma <adityasha...@apache.org> AuthorDate: Sat Jul 25 18:48:39 2020 +0530 Fixed: Unable to create event in SFA component (OFBIZ-9901) When creating event for the party other than the loggedin user, the party should be in CAL_OWNER role to be added to event. Added appropriate check in service along with the error message. Thanks Rubia Elza Joshep for reporting the issue and Aditi Patidar for providing the patch --- applications/party/config/PartyErrorUiLabels.xml | 3 +++ .../minilang/workeffort/WorkEffortSimpleServices.xml | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/applications/party/config/PartyErrorUiLabels.xml b/applications/party/config/PartyErrorUiLabels.xml index 93240b7..57a970b 100644 --- a/applications/party/config/PartyErrorUiLabels.xml +++ b/applications/party/config/PartyErrorUiLabels.xml @@ -731,6 +731,9 @@ <value xml:lang="zh">无法新建已存在的会员角色</value> <value xml:lang="zh-TW">無法新建已存在的團體角色</value> </property> + <property key="PartyRoleAssociationRequired"> + <value xml:lang="en">Party id: ${partyId} should be in role: ${roleDescription}</value> + </property> <property key="partyroleservices.could_not_create_party_role_read"> <value xml:lang="de">Akteur Rolle kann nicht erstellt werden (Lesefehler).</value> <value xml:lang="en">could not create party role read</value> diff --git a/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml b/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml index 0e41b58..89afdbe 100644 --- a/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml +++ b/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml @@ -22,6 +22,22 @@ under the License. xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd"> <simple-method method-name="createWorkEffortAndPartyAssign" short-description="Create Work Effort and assign to a party with a role"> + <entity-one entity-name="PartyRole" value-field="partyRole"> + <field-map field-name="partyId" from-field="parameters.partyId"/> + <field-map field-name="roleTypeId" value="CAL_OWNER"/> + </entity-one> + <if-empty field="partyRole"> + <entity-one entity-name="RoleType" value-field="roleType"> + <field-map field-name="roleTypeId" value="CAL_OWNER"/> + </entity-one> + <if-not-empty field="roleType"> + <set field="roleDescription" from-field="roleType.description"/> + </if-not-empty> + <set field="partyId" from-field="parameters.partyId"></set> + <add-error> + <fail-property resource="PartyErrorUiLabels" property="PartyRoleAssociationRequired" /> + </add-error> + </if-empty> <set-service-fields service-name="createWorkEffort" map="parameters" to-map="create"/> <call-service service-name="createWorkEffort" in-map-name="create"> <result-to-field result-name="workEffortId"/>