Author: jleroux
Date: Thu Oct 17 12:19:33 2019 New Revision: 1868545 URL: http://svn.apache.org/viewvc?rev=1868545&view=rev Log: Fixed: EditExample always update status, because current Status not shown (OFBIZ-11230) In the EditExample Form, the drop-down is populates with the Valid change status only. So current status is not in the list and the status print in the drop-down is the next authorized. I want to modify exampleName or exampleType, I go to editExample and change what I want and validate. The problem is status is also changed! There are 12 other same or similar cases. For the first of them (in FinAccount) there is the same bug: when I change FinAccount Name, status change too. If I add current="first-in-list" in the tag drop-down it works jleroux: Quote is a peculiar case due to OFBIZ-7337 which was a wrong fix Thanks: Oliver for the analysis and the fix Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/widget/FinAccountForms.xml ofbiz/ofbiz-framework/trunk/applications/accounting/widget/FixedAssetForms.xml ofbiz/ofbiz-framework/trunk/applications/content/widget/content/ContentForms.xml ofbiz/ofbiz-framework/trunk/applications/content/widget/content/DataResourceForms.xml ofbiz/ofbiz-framework/trunk/applications/marketing/widget/ContactListForms.xml ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/CustRequestForms.xml ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/OrderForms.xml ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/QuoteForms.xml ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/ReturnForms.xml ofbiz/ofbiz-framework/trunk/applications/party/widget/partymgr/PartyForms.xml ofbiz/ofbiz-framework/trunk/applications/workeffort/widget/WorkEffortForms.xml ofbiz/ofbiz-plugins/trunk/example/widget/example/ExampleForms.xml Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/widget/FinAccountForms.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/widget/FinAccountForms.xml?rev=1868545&r1=1868544&r2=1868545&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/accounting/widget/FinAccountForms.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/accounting/widget/FinAccountForms.xml Thu Oct 17 12:19:33 2019 @@ -123,7 +123,7 @@ under the License. </drop-down> </field> <field name="statusId" use-when="finAccount!=null" title="${uiLabelMap.CommonStatus}"> - <drop-down allow-empty="false" current-description="${currentStatus.description}"> + <drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}"> <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> <entity-constraint name="statusId" env-name="finAccount.statusId"/> <entity-order-by field-name="sequenceId"/> Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/widget/FixedAssetForms.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/widget/FixedAssetForms.xml?rev=1868545&r1=1868544&r2=1868545&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/accounting/widget/FixedAssetForms.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/accounting/widget/FixedAssetForms.xml Thu Oct 17 12:19:33 2019 @@ -365,7 +365,7 @@ under the License. </drop-down> </field> <field name="statusId" use-when="fixedAssetMaint!=null" title="${uiLabelMap.CommonStatus}"> - <drop-down allow-empty="false" current-description="${currentStatus.description}"> + <drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}"> <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> <entity-constraint name="statusId" env-name="fixedAssetMaint.statusId"/> <entity-order-by field-name="sequenceId"/> Modified: ofbiz/ofbiz-framework/trunk/applications/content/widget/content/ContentForms.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/widget/content/ContentForms.xml?rev=1868545&r1=1868544&r2=1868545&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/widget/content/ContentForms.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/widget/content/ContentForms.xml Thu Oct 17 12:19:33 2019 @@ -224,7 +224,7 @@ under the License. </field> <field name="statusId" use-when="currentValue==null"><ignored/></field> <field name="statusId" use-when="currentValue!=null"> - <drop-down allow-empty="false" current-description="${currentStatus.description}"> + <drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}"> <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> <entity-constraint name="statusId" value="${currentValue.statusId}"/> <entity-order-by field-name="sequenceId"/> Modified: ofbiz/ofbiz-framework/trunk/applications/content/widget/content/DataResourceForms.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/widget/content/DataResourceForms.xml?rev=1868545&r1=1868544&r2=1868545&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/widget/content/DataResourceForms.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/widget/content/DataResourceForms.xml Thu Oct 17 12:19:33 2019 @@ -187,7 +187,7 @@ under the License. </field> <field name="statusId" use-when="currentValue==null"><ignored/></field> <field name="statusId" use-when="currentValue!=null"> - <drop-down allow-empty="false" current-description="${currentStatus.description}"> + <drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}"> <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> <entity-constraint name="statusId" value="${currentValue.statusId}"/> <entity-order-by field-name="sequenceId"/> Modified: ofbiz/ofbiz-framework/trunk/applications/marketing/widget/ContactListForms.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/marketing/widget/ContactListForms.xml?rev=1868545&r1=1868544&r2=1868545&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/marketing/widget/ContactListForms.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/marketing/widget/ContactListForms.xml Thu Oct 17 12:19:33 2019 @@ -343,7 +343,7 @@ under the License. </drop-down> </field> <field name="statusId" use-when="communicationEvent!=null" title="${uiLabelMap.CommonStatus}"> - <drop-down allow-empty="false" no-current-selected-key="COM_PENDING" current-description="${uiLabelMap.CommonSelectOne}"> + <drop-down allow-empty="false" current="first-in-list" no-current-selected-key="COM_PENDING" current-description="${uiLabelMap.CommonSelectOne}"> <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> <entity-constraint name="statusId" value="${communicationEvent.statusId}"/> <entity-order-by field-name="sequenceId"/> Modified: ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/CustRequestForms.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/CustRequestForms.xml?rev=1868545&r1=1868544&r2=1868545&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/CustRequestForms.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/CustRequestForms.xml Thu Oct 17 12:19:33 2019 @@ -265,7 +265,7 @@ under the License. <field use-when="custRequest==null" name="statusId"><hidden value="CRQ_SUBMITTED"/></field> <field use-when="custRequest!=null" name="statusId"> - <drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}"> + <drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}toto"> <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> <entity-constraint name="statusId" value="${custRequest.statusId}"/> <entity-order-by field-name="sequenceId"/> Modified: ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/OrderForms.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/OrderForms.xml?rev=1868545&r1=1868544&r2=1868545&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/OrderForms.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/OrderForms.xml Thu Oct 17 12:19:33 2019 @@ -47,7 +47,7 @@ under the License. </drop-down> </field> <field name="statusId" use-when="orderHeader!=null" title="${uiLabelMap.CommonStatus}"> - <drop-down allow-empty="false" current-description="${currentStatus.description}"> + <drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}"> <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> <entity-constraint name="statusId" value="${orderHeader.statusId}"/> <entity-order-by field-name="sequenceId"/> Modified: ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/QuoteForms.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/QuoteForms.xml?rev=1868545&r1=1868544&r2=1868545&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/QuoteForms.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/QuoteForms.xml Thu Oct 17 12:19:33 2019 @@ -111,7 +111,6 @@ under the License. <auto-fields-entity entity-name="Quote" default-field-type="edit"/> <field name="quoteId" use-when="quote!=null" title="${uiLabelMap.OrderOrderQuoteId}"><display/></field> <field name="quoteId" use-when="quote==null" title="${uiLabelMap.OrderOrderQuoteId}"><hidden/></field> - <field name="statusId" title="${uiLabelMap.FormFieldTitle_statusId}"><ignored/></field> <field name="quoteTypeId" title="${uiLabelMap.OrderOrderQuoteTypeId}"> <drop-down allow-empty="true"> <entity-options entity-name="QuoteType" key-field-name="quoteTypeId"> @@ -129,8 +128,15 @@ under the License. </field> <field name="partyId" title="${uiLabelMap.PartyPartyId}"><lookup target-form-name="LookupPartyName"/></field> <field name="issueDate" title="${uiLabelMap.OrderOrderQuoteIssueDate}"></field> + <field name="statusId" use-when="quote==null" title="${uiLabelMap.CommonStatus}"> + <drop-down allow-empty="false"> + <entity-options entity-name="StatusItem"> + <entity-constraint name="statusTypeId" value="QUOTE_STATUS"/> + </entity-options> + </drop-down> + </field> <field name="statusId" use-when="quote!=null" title="${uiLabelMap.CommonStatus}"> - <drop-down allow-empty="false" current-description="${currentStatus.description}"> + <drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}"> <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> <entity-constraint name="statusId" value="${quote.statusId}"/> <entity-order-by field-name="sequenceId"/> Modified: ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/ReturnForms.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/ReturnForms.xml?rev=1868545&r1=1868544&r2=1868545&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/ReturnForms.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/ReturnForms.xml Thu Oct 17 12:19:33 2019 @@ -47,7 +47,7 @@ under the License. </drop-down> </field> <field name="statusId" use-when="returnHeader!=null"> - <drop-down current-description="${currentStatus.description}"> + <drop-down current-description="${currentStatus.description}" current="first-in-list" > <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> <entity-constraint name="statusId" env-name="returnHeader.statusId"/> <entity-order-by field-name="sequenceId"/> Modified: ofbiz/ofbiz-framework/trunk/applications/party/widget/partymgr/PartyForms.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/widget/partymgr/PartyForms.xml?rev=1868545&r1=1868544&r2=1868545&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/party/widget/partymgr/PartyForms.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/party/widget/partymgr/PartyForms.xml Thu Oct 17 12:19:33 2019 @@ -783,7 +783,7 @@ under the License. </drop-down> </field> <field name="statusId" use-when="content!=null"> - <drop-down allow-empty="false" current-description="${currentStatus.description}" no-current-selected-key="CTNT_AVAILABLE"> + <drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}" no-current-selected-key="CTNT_AVAILABLE"> <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> <entity-constraint name="statusId" value="${content.statusId}"/> <entity-order-by field-name="sequenceId"/> Modified: ofbiz/ofbiz-framework/trunk/applications/workeffort/widget/WorkEffortForms.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/workeffort/widget/WorkEffortForms.xml?rev=1868545&r1=1868544&r2=1868545&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/workeffort/widget/WorkEffortForms.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/workeffort/widget/WorkEffortForms.xml Thu Oct 17 12:19:33 2019 @@ -569,7 +569,7 @@ under the License. </drop-down> </field> <field name="statusId" use-when="communicationEvent!=null" title="${uiLabelMap.CommonStatus}"> - <drop-down allow-empty="false" current-description="${currentStatus.description}"> + <drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}"> <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> <entity-constraint name="statusId" value="${communicationEvent.statusId}"/> <entity-order-by field-name="sequenceId"/> Modified: ofbiz/ofbiz-plugins/trunk/example/widget/example/ExampleForms.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/example/widget/example/ExampleForms.xml?rev=1868545&r1=1868544&r2=1868545&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/example/widget/example/ExampleForms.xml (original) +++ ofbiz/ofbiz-plugins/trunk/example/widget/example/ExampleForms.xml Thu Oct 17 12:19:33 2019 @@ -198,7 +198,8 @@ under the License. </drop-down> </field> <field name="statusId" use-when="example!=null" title="${uiLabelMap.CommonStatus}" required-field="true"> - <drop-down allow-empty="false" current-description="${currentStatus.description}"> + <drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}"> + <option key="${currentStatus.statusId}" description="${currentStatus.description}"/> <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> <entity-constraint name="statusId" env-name="example.statusId"/> </entity-options> |
Free forum by Nabble | Edit this page |