improved error message on suggestion of other committers

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@685395 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hans Bakker
2008-08-13 00:13:08 +00:00
parent bbd3ebbdb0
commit f97d937600
2 changed files with 12 additions and 5 deletions
@@ -70,11 +70,15 @@ under the License.
<!-- 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"/>
@@ -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>