svn commit: r1659923 - /ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunTaskParties.groovy

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

svn commit: r1659923 - /ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunTaskParties.groovy

jleroux@apache.org
Author: jleroux
Date: Sun Feb 15 13:35:03 2015
New Revision: 1659923

URL: http://svn.apache.org/r1659923
Log:
Forgot to commit this "unversioned file" in r1659914, thanks to Pierre for spotting it.

Added:
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunTaskParties.groovy   (with props)

Added: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunTaskParties.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunTaskParties.groovy?rev=1659923&view=auto
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunTaskParties.groovy (added)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunTaskParties.groovy Sun Feb 15 13:35:03 2015
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.ofbiz.manufacturing.jobshopmgt.ProductionRun;
+taskPartyAssocList = [];
+productionRunId = parameters.productionRunId ?: parameters.workEffortId;
+if (productionRunId) {
+    ProductionRun productionRun = new ProductionRun(productionRunId, delegator, dispatcher);
+    if (productionRun.exist()) {
+        productionRunTasks = productionRun.getProductionRunRoutingTasks();
+        
+        if (productionRunTasks) {
+            productionRunTasks.each { prodRunTask ->
+                prodRunTaskId = prodRunTask.workEffortId;
+                taskPartyAssocs = from("WorkEffortPartyAssignment").where("workEffortId", prodRunTaskId).queryList();
+                if (taskPartyAssocs) {
+                    taskPartyAssocs.each { taskPartyAssoc ->
+                        taskPartyAssocList.add(taskPartyAssoc);
+                    }
+                }
+            }
+        }
+        
+    }
+}
+context.productionRunTaskParties = taskPartyAssocList
\ No newline at end of file

Propchange: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunTaskParties.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunTaskParties.groovy
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunTaskParties.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain