Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0046685
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] A. Platformmajoralways2021-05-14 13:402021-05-18 13:57
ReportermarvintmView Statuspublic 
Assigned Tocberner 
PriorityimmediateResolutionfixedFixed in VersionPR21Q1.2
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionPR21Q1.2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date2020-10-27
Regression introduced in releasePR21Q1
Regression introduced by commithttps://gitlab.com/openbravo/product/openbravo/-/commit/74ec2cdad81aba152fc7a704384cc96836dabde9 [^]
Triggers an Emergency PackNo
Summary

0046685: If a tab has a field for the id of the entity, it is no longer possible to create a new record in form view

DescriptionFor Application Dictionary generated windows, if a tab has a field for the id of the entity, it is no longer possible to create a new record in form view.

An example of this can be found in the "Coupons on the Fly" module.
Steps To Reproduce- Log in https://livebuilds.openbravo.com/retail_modules_pgsql_pi/, [^] using "White valley group admin" role
- Create a discount in "Discounts and promotion" window of type "Variable Amount Coupons". Make sure to check the flags "Uses coupon codes" and "Is OTF coupon"
- Go to "OTF Coupons generation rules".
- Create a new record in form view. Check the "Is variable coupon" flag. Fill all remaining mandatory fields (select the previously created discount as discount).
- Realise that you cannot save the record, because the following error is shown:

Error
Saving failed. One or more fields contain illegal values, check the errors for each field.

If the definition of the window is changed, and the field for the id is removed, then the record can be saved correctly.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0046681 closedcberner If a tab has a field for the id of the entity, it is no longer possible to create a new record in form view 

-  Notes
(0128301)
hgbot (developer)
2021-05-18 10:05

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/368 [^]
(0128327)
hgbot (developer)
2021-05-18 13:57

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/368 [^]
(0128328)
hgbot (developer)
2021-05-18 13:57

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 3f52e5ace10eb872561509df5e6f822d698262d4
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 2021-05-18T10:04:56+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/3f52e5ace10eb872561509df5e6f822d698262d4 [^]

Fixes ISSUE-46685: Not possible to create a new record in form view if id is present in tab

This was due to how validation is handled in form, to avoid ISSUE-45301
a validateHiddenFields flag has been set to true to validate all hidden
fields that may be present in the form but under collapsed field groups.
This also checks all hidden fields, for example in this case identifier.
Which on new records is always undefined, until the record is saved and
an id is received.

To fix this, a check is done at validateField level, if the field is hidden and not displayed, validation will be skipped.
An alternative would be to only validate displayed fields at this level,
but this may be more prone to errors.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
---

- Issue History
Date Modified Username Field Change
2021-05-14 15:03 cberner Type defect => backport
2021-05-14 15:03 cberner Target Version => PR21Q1.2
2021-05-18 09:52 cberner Priority normal => immediate
2021-05-18 10:05 hgbot Note Added: 0128301
2021-05-18 13:57 hgbot Note Added: 0128327
2021-05-18 13:57 hgbot Resolution open => fixed
2021-05-18 13:57 hgbot Status scheduled => closed
2021-05-18 13:57 hgbot Fixed in Version => PR21Q1.2
2021-05-18 13:57 hgbot Note Added: 0128328


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker