Openbravo Issue Tracking System - Retail Modules
View Issue Details
0049791Retail ModulesRetail APIpublic2022-07-12 16:092022-09-29 18:29
axelmercado 
AugustoMauch 
highmajoralways
closedfixed 
5
RR21Q1.1 
RR21Q1.1 
No
0049791: updates through ImportService are not reflected as audit information
When updating a product through the ImportService/PriceList API, the product changes correctly but the "Updated" field is not changed, so the changes are not reflected in the POS, which generates a problem when updating prices in the stores.
Video with the steps: https://www.awesomescreenshot.com/video/9924375?key=4daaa332e4d204c2381395db3208dca2 [^]

Attach JSON.
No tags attached.
related to feature request 0039404 closed AugustoMauch Modules Allow via preference updating the "updated" audit column when importing records 
has duplicate defect 0049846 closed radhakrishnan Retail Modules API issue - When updating the price through an API, the audit fields are not updated 
? product.json (690) 2022-07-12 16:09
https://issues.openbravo.com/file_download.php?file_id=17301&type=bug
Issue History
2022-07-12 16:09axelmercadoNew Issue
2022-07-12 16:09axelmercadoAssigned To => Triage Platform Conn
2022-07-12 16:09axelmercadoFile Added: product.json
2022-07-12 16:09axelmercadoTriggers an Emergency Pack => No
2022-07-12 16:17PracticsIssue Monitored: Practics
2022-07-15 11:12alostaleSummaryError ImportService/Pricelist => updates through ImportService are not reflected as audit information
2022-07-15 11:12alostaleRelationship addedrelated to 0039404
2022-07-15 11:16alostaleNote Added: 0139349
2022-07-15 11:21alostaleStatusnew => acknowledged
2022-08-03 08:03alostaleRelationship addedhas duplicate 0049846
2022-08-11 08:35adrianromeroAssigned ToTriage Platform Conn => caristu
2022-08-19 16:01jose_duqueIssue cloned0050016
2022-08-26 13:25AugustoMauchAssigned Tocaristu => AugustoMauch
2022-09-12 00:45hgbotNote Added: 0140986
2022-09-29 18:28hgbotNote Added: 0141518
2022-09-29 18:28hgbotResolutionopen => fixed
2022-09-29 18:28hgbotStatusacknowledged => closed
2022-09-29 18:28hgbotNote Added: 0141519
2022-09-29 18:29caristuNote Added: 0141520

Notes
(0139349)
alostale   
2022-07-15 11:16   
This is controlled with the global "Update 'updated' audit field on import" preference that can be set to "Y" at System level (tomcat restart is required afterward).

I'm internally raising the topic to understand why we have this preference at all and in which cases it might make sense not to update audit info.
(0140986)
hgbot   
2022-09-12 00:45   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.external.integration/-/merge_requests/26 [^]
(0141518)
hgbot   
2022-09-29 18:28   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.external.integration/-/merge_requests/26 [^]
(0141519)
hgbot   
2022-09-29 18:28   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.external.integration [^]
Changeset: 40e944d61ea2e3a75c4a80dcf8c2b43a893a6ddd
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 29-09-2022 18:15:11
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.external.integration/-/commit/40e944d61ea2e3a75c4a80dcf8c2b43a893a6ddd [^]

Fixes ISSUE-49791: Update audit fields by default, allow to disable it at entity mapping devel

We were not updating the "updated" audit field by default, and we were only allowing it to disable it at global preference level,
so either it was disabled for all entities or it was for none. Now that preferencec has been disabled, and we use now a new field
at entity mapping level to determine if the audit field should be updated.

That field is excluded from the AD dataset, because different clients might have different needs

---
A src-db/database/sourcedata/AD_DATASET_COLUMN.xml
M src-db/database/model/tables/OBEI_ENTITY_MAPPING.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
M src/org/openbravo/service/external/integration/edl/BaseImportItemProcessor.java
---
(0141520)
caristu   
2022-09-29 18:29   
Updated documentation: http://wiki.openbravo.com/wiki/Modules:External_Integration_Infrastructure/UserGuide#Entity_Mappings [^]