Author: jleroux
Date: Fri Mar 25 17:53:50 2016
New Revision: 1736621
URL:
http://svn.apache.org/viewvc?rev=1736621&view=revLog:
A patch from Pierre Smits for <<Correct setting of the WorkEffortPurposeTypeId on production run tasks>>
https://issues.apache.org/jira/browse/OFBIZ-6954Currently when a new production run is created, the workeffort purpose type id is set to WEPT_PRODUCTION_RUN. This setting should also be applied to the associate production run tasks.
However, this doesn't happen. Instead the workeffort purpose type id from the routing task is copied.
jleroux: I agree with Pierre after a short discussion. This patch will ensure that routing tasks will be visible in the CAL_MANUFACTURING calendar without losing any information since the association, be a routing task or a task for a production run, will remain in the WorkEffortAssoc entity with a workEffortAssocTypeId = “WORK_EFF_TEMPLATE”.
Modified:
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=1736621&r1=1736620&r2=1736621&view=diff==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Fri Mar 25 17:53:50 2016
@@ -318,7 +318,7 @@ public class ProductionRunServices {
serviceContext.clear();
serviceContext.put("priority", routingTaskAssoc.get("sequenceNum"));
- serviceContext.put("workEffortPurposeTypeId", routingTask.get("workEffortPurposeTypeId"));
+ serviceContext.put("workEffortPurposeTypeId", "WEPT_PRODUCTION_RUN");
serviceContext.put("workEffortName",routingTask.get("workEffortName"));
serviceContext.put("description",routingTask.get("description"));
serviceContext.put("fixedAssetId",routingTask.get("fixedAssetId"));