Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0057357 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [POS2] POS | minor | always | 2024-12-03 19:27 | 2024-12-12 14:24 | |||
Reporter | sofidossant | View Status | public | |||||
Assigned To | Bimla_vm | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 25Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | pi | SCM revision | ||||||
Review Assigned To | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0057357: Regular expression in CRM does not work with null | |||||||
Description | When I configure the validation in the adress name field in the CRM, and I add the validation and the regular expression ^.{0,60}$, and when I want to save an adress in null, it fails and shows me the error message. | |||||||
Steps To Reproduce | 1- Configurate in CRM, field address name, validation in Y, type:Regular Expression and regular expression validation ^.{0,60}$ 2- Do the refresh in the webpos2 3 - Create a new address with null, and check the error: "name has not a valid pattern " | |||||||
Proposed Solution | Errro in the code const regExpValidator = new Validator( `regExp`, // eslint-disable-next-line no-unused-vars (propertyForValidation, entityForValidation) => propertyForValidation.value && new RegExp(propertyForValidation.extraProperties.validationregexp).test( propertyForValidation.value ) ? { status: VALIDATION_STATUS.OK } : { status: VALIDATION_STATUS.ERROR, message: getLabel('$OBC2_RegExpValidationError', [ propertyForValidation.name ]), propertyName: propertyForValidation.name } ); The if gives null and the regex If in javascript we try: undefined ? 1: 0, the result is 0. So it fails even though the regex gives me ok. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0173030) hgbot (developer) 2024-12-06 06:03 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/3211 [^] |
(0173031) hgbot (developer) 2024-12-06 06:07 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1677 [^] |
(0173242) hgbot (developer) 2024-12-12 14:23 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^] Changeset: 39a369a8f4a6ff6dd44045424e82bb7f7d4c5d88 Author: Bimla Mayavan <b.mayavan@external.orisha.com> Date: 12-12-2024 13:23:13 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/39a369a8f4a6ff6dd44045424e82bb7f7d4c5d88 [^] Fixed ISSUE-57357: Modified the condition of regExp validation --- M web-jspack/org.openbravo.core2/src/core/validatorEngine/validators/regExp/regExpValidator.js --- |
(0173243) hgbot (developer) 2024-12-12 14:23 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1677 [^] |
(0173244) hgbot (developer) 2024-12-12 14:24 |
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^] Changeset: 1af08fa3ee8afda011981e45b3b0e651b11e52d4 Author: Bimla Mayavan <b.mayavan@external.orisha.com> Date: 12-12-2024 13:23:41 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/1af08fa3ee8afda011981e45b3b0e651b11e52d4 [^] Related to ISSUE-57357: Handled error msg in customerFormHandlerUtils --- M web-jspack/org.openbravo.pos2/src/components/Customer/CustomerUtils/CustomerFormHandlerUtils.js --- |
(0173245) hgbot (developer) 2024-12-12 14:24 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/3211 [^] |
Issue History | |||
Date Modified | Username | Field | Change |
2024-12-03 19:27 | sofidossant | New Issue | |
2024-12-03 19:27 | sofidossant | Assigned To | => Retail |
2024-12-03 19:27 | sofidossant | Triggers an Emergency Pack | => No |
2024-12-04 14:51 | guilleaer | Assigned To | Retail => guilleaer |
2024-12-04 14:51 | guilleaer | Status | new => acknowledged |
2024-12-04 15:04 | Bimla_vm | Assigned To | guilleaer => Bimla_vm |
2024-12-04 15:04 | Bimla_vm | Status | acknowledged => scheduled |
2024-12-06 06:03 | hgbot | Note Added: 0173030 | |
2024-12-06 06:07 | hgbot | Note Added: 0173031 | |
2024-12-12 14:23 | hgbot | Resolution | open => fixed |
2024-12-12 14:23 | hgbot | Status | scheduled => closed |
2024-12-12 14:23 | hgbot | Fixed in Version | => 25Q1 |
2024-12-12 14:23 | hgbot | Note Added: 0173242 | |
2024-12-12 14:23 | hgbot | Note Added: 0173243 | |
2024-12-12 14:24 | hgbot | Note Added: 0173244 | |
2024-12-12 14:24 | hgbot | Note Added: 0173245 |
Copyright © 2000 - 2009 MantisBT Group |