Author: jleroux
Date: Mon Feb 20 21:54:30 2012 New Revision: 1291472 URL: http://svn.apache.org/viewvc?rev=1291472&view=rev Log: Closes "Request Content delete operation is not working" https://issues.apache.org/jira/browse/OFBIZ-4707 There were simply no checks on thruDate in screen actions, also true for Project Manager and Scrum components. Also where we see that we clearly miss a kind of factorization in those screen actions (same block changed 5 times), no time for that tonight... Modified: ofbiz/trunk/applications/order/widget/ordermgr/CustRequestScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/CustRequestScreens.xml ofbiz/trunk/specialpurpose/scrum/widget/scrumScreens.xml Modified: ofbiz/trunk/applications/order/widget/ordermgr/CustRequestScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/CustRequestScreens.xml?rev=1291472&r1=1291471&r2=1291472&view=diff ============================================================================== --- ofbiz/trunk/applications/order/widget/ordermgr/CustRequestScreens.xml (original) +++ ofbiz/trunk/applications/order/widget/ordermgr/CustRequestScreens.xml Mon Feb 20 21:54:30 2012 @@ -75,9 +75,17 @@ under the License. <entity-and entity-name="CustRequestContent" list="custRequestContents" filter-by-date="true"> <field-map field-name="custRequestId" from-field="custRequestId"/> </entity-and> - <entity-and entity-name="CustRequestAndContent" list="custRequestAndContents"> - <field-map field-name="custRequestId" from-field="custRequestId"/> - </entity-and> + <entity-condition entity-name="CustRequestAndContent" list="custRequestAndContents"> + <condition-list combine="and"> + <condition-expr field-name="custRequestId" from-field="custRequestId"/> + <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/> + <condition-list combine="or"> + <condition-expr field-name="thruDate" operator="greater-equals" from-field="nowTimestamp"/> + <condition-expr field-name="thruDate" from-field="null"/> + </condition-list> + </condition-list> + <order-by field-name="fromDate"/> + </entity-condition> <entity-and entity-name="CustRequestItemNoteView" list="notes"> <field-map field-name="custRequestId" from-field="custRequestId"/> </entity-and> @@ -476,9 +484,17 @@ under the License. <set field="tabButtonItem" value="custRequestContent"/> <set field="headerItem" value="request"/> <set field="custRequestId" from-field="parameters.custRequestId"/> - <entity-and entity-name="CustRequestAndContent" list="custRequestAndContents"> - <field-map field-name="custRequestId" from-field="custRequestId"/> - </entity-and> + <entity-condition entity-name="CustRequestAndContent" list="custRequestAndContents"> + <condition-list combine="and"> + <condition-expr field-name="custRequestId" from-field="custRequestId"/> + <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/> + <condition-list combine="or"> + <condition-expr field-name="thruDate" operator="greater-equals" from-field="nowTimestamp"/> + <condition-expr field-name="thruDate" from-field="null"/> + </condition-list> + </condition-list> + <order-by field-name="fromDate"/> + </entity-condition> </actions> <widgets> <decorator-screen name="CommonRequestDecorator" location="${parameters.mainDecoratorLocation}"> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/CustRequestScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/CustRequestScreens.xml?rev=1291472&r1=1291471&r2=1291472&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/CustRequestScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/CustRequestScreens.xml Mon Feb 20 21:54:30 2012 @@ -121,13 +121,21 @@ under the License. <entity-and entity-name="CustRequestContent" list="custRequestContents" filter-by-date="true"> <field-map field-name="custRequestId" from-field="custRequestId"/> </entity-and> - <entity-and entity-name="CustRequestAndContent" list="custRequestAndContents"> - <field-map field-name="custRequestId" from-field="custRequestId"/> - </entity-and> + <entity-condition entity-name="CustRequestAndContent" list="custRequestAndContents"> + <condition-list combine="and"> + <condition-expr field-name="custRequestId" from-field="custRequestId"/> + <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/> + <condition-list combine="or"> + <condition-expr field-name="thruDate" operator="greater-equals" from-field="nowTimestamp"/> + <condition-expr field-name="thruDate" from-field="null"/> + </condition-list> + </condition-list> + <order-by field-name="fromDate"/> + </entity-condition> </actions> <widgets> <decorator-screen name="CommonRequestDecorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> + <decorator-section name="body"> <container style="lefthalf"> <screenlet title="${uiLabelMap.OrderRequestInformation}"> <include-form name="requestInfo" location="component://order/widget/ordermgr/CustRequestForms.xml"/> Modified: ofbiz/trunk/specialpurpose/scrum/widget/scrumScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/widget/scrumScreens.xml?rev=1291472&r1=1291471&r2=1291472&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/scrum/widget/scrumScreens.xml (original) +++ ofbiz/trunk/specialpurpose/scrum/widget/scrumScreens.xml Mon Feb 20 21:54:30 2012 @@ -699,10 +699,17 @@ under the License. <entity-one entity-name="Product" value-field="productMap"> <field-map field-name="productId" from-field="parameters.productId"/> </entity-one> - <entity-and entity-name="CustRequestAndContent" list="custRequestAndContents"> - <field-map field-name="custRequestId" from-field="custRequestId"/> - <field-map field-name="thruDate" value=""></field-map> - </entity-and> + <entity-condition entity-name="CustRequestAndContent" list="custRequestAndContents"> + <condition-list combine="and"> + <condition-expr field-name="custRequestId" from-field="custRequestId"/> + <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/> + <condition-list combine="or"> + <condition-expr field-name="thruDate" operator="greater-equals" from-field="nowTimestamp"/> + <condition-expr field-name="thruDate" from-field="null"/> + </condition-list> + </condition-list> + <order-by field-name="fromDate"/> + </entity-condition> <entity-and entity-name="CustRequestAndCustRequestItem" list="categoryList"> <field-map field-name="productId" from-field="parameters.productId"/> <field-map field-name="custRequestTypeId" value="RF_PARENT_BACKLOG"/> @@ -1019,10 +1026,17 @@ under the License. <set field="contentId" from-field="parameters.contentId"/> <set field="custRequestId" from-field="parameters.custRequestId"/> <set field="productId" from-field="parameters.productId"/> - <entity-and entity-name="CustRequestAndContent" list="custRequestAndContents"> - <field-map field-name="custRequestId" from-field="custRequestId"/> - <field-map field-name="thruDate" value=""></field-map> - </entity-and> + <entity-condition entity-name="CustRequestAndContent" list="custRequestAndContents"> + <condition-list combine="and"> + <condition-expr field-name="custRequestId" from-field="custRequestId"/> + <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/> + <condition-list combine="or"> + <condition-expr field-name="thruDate" operator="greater-equals" from-field="nowTimestamp"/> + <condition-expr field-name="thruDate" from-field="null"/> + </condition-list> + </condition-list> + <order-by field-name="fromDate"/> + </entity-condition> </actions> <widgets> <decorator-screen name="CommonScrumProductBacklogItemDecorator" location="${parameters.mainDecoratorLocation}"> |
Free forum by Nabble | Edit this page |