Author: hansbak
Date: Mon Jun 29 14:02:36 2009 New Revision: 789329 URL: http://svn.apache.org/viewvc?rev=789329&view=rev Log: assign resource with start and enddate gave error, reported by farouk alhassan on the mailinglist Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml?rev=789329&r1=789328&r2=789329&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Mon Jun 29 14:02:36 2009 @@ -124,15 +124,11 @@ <condition> <or> <and> - <not> - <if-empty field="parameters.newPartyId"/> - </not> + <not><if-empty field="parameters.newPartyId"/></not> <if-compare-field field="parameters.partyId" to-field="parameters.newPartyId" operator="not-equals"/> </and> <and> - <not> - <if-empty field="parameters.newRoleTypeId"/> - </not> + <not><if-empty field="parameters.newRoleTypeId"/></not> <if-compare-field field="parameters.roleTypeId" to-field="parameters.newRoleTypeId" operator="not-equals"/> </and> </or> @@ -156,14 +152,15 @@ <create-value value-field="newAssign"/> </then> <else> - <if-not-empty field="parameters.fromDate"> + <set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/> + <entity-one entity-name="WorkEffortPartyAssignment" value-field="assignment"> + <field-map field-name="workEffortId" from-field="parameters.workEffortId"/> + <field-map field-name="partyId" from-field="parameters.partyId"/> + <field-map field-name="roleTypeId" from-field="parameters.roleTypeId"/> + <field-map field-name="fromDate" from-field="fromDate"/> + </entity-one> + <if-not-empty field="assignment"> <!-- status changed or assignment ended --> - <entity-one entity-name="WorkEffortPartyAssignment" value-field="assignment"> - <field-map field-name="workEffortId" from-field="parameters.workEffortId"/> - <field-map field-name="partyId" from-field="parameters.partyId"/> - <field-map field-name="roleTypeId" from-field="parameters.roleTypeId"/> - <field-map field-name="fromDate" from-field="parameters.fromDate"/> - </entity-one> <if-compare field="parameters.statusId" value="PAS_ENDED" operator="equals"> <!-- special case to indicate end of assignment --> <now-timestamp field="assignment.thruDate"/> Modified: ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml?rev=789329&r1=789328&r2=789329&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml Mon Jun 29 14:02:36 2009 @@ -235,6 +235,7 @@ <attribute name="roleTypeId" type="String" mode="IN" optional="false"/> <attribute name="statusId" type="String" mode="IN"/> <attribute name="fromDate" type="Timestamp" mode="INOUT" optional="true"/> + <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/> <attribute name="delegateReasonEnumId" type="String" mode="IN" optional="true"/> <attribute name="comments" type="String" mode="IN" optional="true"/> </service> Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml?rev=789329&r1=789328&r2=789329&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml Mon Jun 29 14:02:36 2009 @@ -188,6 +188,12 @@ <response name="success" type="view" value="EditTaskPartyAssigns"/> <response name="error" type="view" value="EditTaskPartyAssigns"/> </request-map> + <request-map uri="removeTaskPartyAssign"> + <security https="true" auth="true"/> + <event type="service" invoke="unassignPartyFromWorkEffort"/> + <response name="success" type="view" value="EditTaskPartyAssigns"/> + <response name="error" type="view" value="EditTaskPartyAssigns"/> + </request-map> <request-map uri="createTask"> <security https="true" auth="true"/> <event type="service" invoke="createProjectTask"/> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=789329&r1=789328&r2=789329&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Mon Jun 29 14:02:36 2009 @@ -539,8 +539,9 @@ </form> <form name="EditWorkEffortPartyAssigns" target="deleteTaskPartyAssign" title="" type="list" paginate-target="EditTaskPartyAssigns" odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <alt-target use-when="thruDate!=null" target="removeTaskPartyAssign"/> <actions> - <entity-condition entity-name="WorkEffortPartyAssignment" filter-by-date="true"> + <entity-condition entity-name="WorkEffortPartyAssignment"> <condition-expr field-name="workEffortId" operator="equals" from-field="workEffortId"/> <order-by field-name="roleTypeId"/> </entity-condition> |
Free forum by Nabble | Edit this page |