svn commit: r1791277 - /ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml

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

svn commit: r1791277 - /ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml

jleroux@apache.org
Author: jleroux
Date: Thu Apr 13 16:56:58 2017
New Revision: 1791277

URL: http://svn.apache.org/viewvc?rev=1791277&view=rev
Log:
Fixed: WorkEffort shows error on party assignment
(OFBIZ-9314)

Steps to reproduce:
Go to workEffort component.
2) Create a new task from New Task button
    https://localhost:8443/workeffort/control/mytasks .
3) After creating Task with required fields, click on parties tab.
4) Screen for WorkEffort Party Assignment will be displayed.
5) Choose any party and role.
6) Click on Add. Error will be displayed.

Solution:
Any party is assigned to a WorkEffort on specific role, hence it is necessary
that party should be in that role first (PartyRole).
Added code which make sure the party should be in given role (i.e service call
to ensurePartyRole).

Thanks: Jagpreet Kaur

Modified:
    ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml

Modified: ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml?rev=1791277&r1=1791276&r2=1791277&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/workeffort/minilang/workeffort/WorkEffortSimpleServices.xml Thu Apr 13 16:56:58 2017
@@ -346,6 +346,9 @@ under the License.
         </if-not-empty>
         <check-errors/>
 
+        <set field="ensurePartyRoleCtx.partyId" from-field="parameters.partyId"/>
+        <set field="ensurePartyRoleCtx.roleTypeId" from-field="parameters.roleTypeId"/>
+        <call-service service-name="ensurePartyRole" in-map-name="ensurePartyRoleCtx"/>
         <make-value value-field="newEntity" entity-name="WorkEffortPartyAssignment"/>
 
         <set-pk-fields map="parameters" value-field="newEntity"/>