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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0050242
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformtrivialalways2022-09-13 17:042022-10-10 13:34
ReportermigueldejuanaView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in VersionPR23Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0050242: Setting the value of a field in the Status Bar with an EventObserver need a refresh

DescriptionUsing an EntityPersistenceEventObserver, if we modify a column (in onSave method) shown in the window Status Bar, the Status Bar do not show the change done in the Event Observer.

It is not working in Form mode but it is working fine in Grid mode.
Steps To Reproduce- Create this Event Observer:

public class TestOrderStatusEventObserver extends EntityPersistenceEventObserver {
  private static final Entity[] ENTITIES = {
      ModelProvider.getInstance().getEntity(Order.ENTITY_NAME) };
  private static final Property DOCSTATUS_PROPERTY = ENTITIES[0]
      .getProperty(Order.PROPERTY_DOCUMENTSTATUS);

  @Override
  protected Entity[] getObservedEntities() {
    return ENTITIES;
  }

  public void onSave(@Observes final EntityNewEvent event) {
    if (!isValidEvent(event)) {
      return;
    }
    event.setCurrentState(DOCSTATUS_PROPERTY, "CO");
  }
}

- Open Sales Order window in the ERP
- Create new Sales Order in Form Mode and Save.
- ERROR! In the Status Bar, Document Status is "Draft" and it should be "Booked"
- If we refresh the Sales Order, the Status Bar is updated and we see Document Status: Booked
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0141541)
hgbot (developer)
2022-10-02 23:53

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/721 [^]
(0141905)
hgbot (developer)
2022-10-10 13:34

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: f1507ec30749237f520e48f3e92a29de7e0e383e
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 10-10-2022 09:56:22
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/f1507ec30749237f520e48f3e92a29de7e0e383e [^]

Fixes ISSUE-50242: List property is properly updated in the status bar of the standard form

When a list formitem was updated by an event handler, its display value in a status bar was not being updated properly. The problem was that
the value used to determine what should be displayed was initially properly obtained using formItem.getDisplayValue, but then was incorrectly
overwritten by its identifier, that for this type of items is not relevant because the valueMap value should take precedence.

The change has been done in the getStatusBarFields that determines how the field is rendered in a status bar, the scope of the change is very
limited so the change should not be risky

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
---
(0141906)
hgbot (developer)
2022-10-10 13:34

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/721 [^]

- Issue History
Date Modified Username Field Change
2022-09-13 17:04 migueldejuana New Issue
2022-09-13 17:04 migueldejuana Assigned To => Triage Platform Base
2022-09-13 17:04 migueldejuana Modules => Core
2022-09-13 17:04 migueldejuana Triggers an Emergency Pack => No
2022-09-13 17:05 migueldejuana Steps to Reproduce Updated View Revisions
2022-09-13 17:06 migueldejuana Steps to Reproduce Updated View Revisions
2022-09-26 08:22 AugustoMauch Status new => scheduled
2022-09-26 08:22 AugustoMauch Assigned To Triage Platform Base => meriem_azaf
2022-10-02 23:53 hgbot Note Added: 0141541
2022-10-03 00:09 AugustoMauch Assigned To meriem_azaf => AugustoMauch
2022-10-10 13:34 hgbot Resolution open => fixed
2022-10-10 13:34 hgbot Status scheduled => closed
2022-10-10 13:34 hgbot Fixed in Version => PR23Q1
2022-10-10 13:34 hgbot Note Added: 0141905
2022-10-10 13:34 hgbot Note Added: 0141906


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker