Author: hansbak
Date: Tue Aug 12 17:13:08 2008 New Revision: 685395 URL: http://svn.apache.org/viewvc?rev=685395&view=rev Log: improved error message on suggestion of other committers Modified: ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml ofbiz/trunk/framework/common/config/CommonUiLabels.xml Modified: ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml?rev=685395&r1=685394&r2=685395&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml (original) +++ ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml Tue Aug 12 17:13:08 2008 @@ -70,11 +70,15 @@ <!-- attach to a customer request if passed and copy attached docs if customer request has communication events with attachments --> <if-not-empty field="parameters.custRequestId"> - <!-- check status of customer request should be assigned --> - <entity-one entity-name="CustRequest" value-name="custRequest"/> - <if-compare operator="not-equals" value="CRQ_ACCEPTED" field="custRequest.statusId"> - <add-error><fail-message message="Cannot create task from Customer Request: wrong status of customer request"/></add-error> - </if-compare> + <!-- check status of customer request if valid --> + <entity-one entity-name="CustRequest" value-name="lookedUpValue"/> + <set field="goodStatusId" value="CRQ_ACCEPTED"/> + <if-compare-field operator="not-equals" field="lookedUpValue.statusId" to-field="goodStatusId" > + <set field="entity" value="Customer request"/> + <add-error><fail-property resource="CommonUiLabels" property="CommonErrorStatusNotValid"/></add-error> + <check-errors/> + </if-compare-field> + <!-- create customer request / work effort relation --> <make-value value-name="custRequestWorkEffort" entity-name="CustRequestWorkEffort"/> <set field="custRequestWorkEffort.workEffortId" from-field="newEntity.workEffortId" /> <set field="custRequestWorkEffort.custRequestId" from-field="parameters.custRequestId"/> Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonUiLabels.xml?rev=685395&r1=685394&r2=685395&view=diff ============================================================================== --- ofbiz/trunk/framework/common/config/CommonUiLabels.xml (original) +++ ofbiz/trunk/framework/common/config/CommonUiLabels.xml Tue Aug 12 17:13:08 2008 @@ -1976,6 +1976,9 @@ <value xml:lang="th">Error: à¸à¹à¸à¸à¸´à¸à¸à¸¥à¸²à¸ ! à¹à¸¡à¹à¸à¸à¸¸à¸à¸²à¸à¸´à¹à¸à¸¥à¸µà¹à¸¢à¸à¸ªà¸à¸²à¸à¸°à¸à¸²à¸ [${lookedUpValue.statusId}] à¹à¸à¹à¸ [${parameters.statusId}]</value> <value xml:lang="zh">é误: ä¸å 许æç¶æä»[${lookedUpValue.statusId}]å为[${parameters.statusId}]ã</value> </property> + <property key="CommonErrorStatusNotValid"> + <value xml:lang="en">Error: status of ${entity} is not valid, it is: ${lookedUpValue.statusId} but should be: ${goodStatusId}.</value> + </property> <property key="CommonEventDate"> <value xml:lang="ar">تارÙØ® اÙØدث</value> <value xml:lang="de">Ereignisdatum</value> |
Free forum by Nabble | Edit this page |