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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039426
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2018-10-09 18:122018-12-11 20:22
ReporteraaroncaleroView Statuspublic 
Assigned Tocaristu 
PriorityhighResolutionfixedFixed in Version3.0PR19Q1
StatusclosedFix in branchFixed in SCM revision442d564cc845
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0039426: [Resources and Reservations] Duplicated call to the reservations datasource when refreshing the Resources Reservation widget

DescriptionWhen the Resource Reservation widget is loaded, two different requests are done to the Resources Calendar Data Source, both of them returning apparently the same data.
Steps To ReproduceIn an environment with Resources and Reservations module installed (https://code.openbravo.com/erp/pmods/org.openbravo.module.resources [^]) and configured:
Login in backend as F&B International Group Admin
In the Openbravo workspace, add the Resources and Reservations calendar widget.
Create several reservations.
Open the browser console and go to the Network tab
Refresh the widget.
Verify on the Network tab that two requests have been done to <server>/org.openbravo.service.datasource/4591756D1AFA4A85BDA9B85341E3CD24
TagsPerformance
Attached Filesdiff file icon 39426.diff [^] (1,599 bytes) 2018-10-17 16:19 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0107348)
markmm82 (developer)
2018-10-17 04:39

Test Plan:
As Openbravo / F&B International Group Admin
    Create a new Preference
        Client: F&B International Group
        Organization: F&B España, S.A
        Property List: Yes
        Property: Local Timezone ID
        Value: Europe/Madrid
 
    Create a new Reservation Calendar
        Organization: F&B España, S.A
        Name: 2018 Calendar
        Time Reservation Unit: Hourly
        Show Weekend: YES
 
    Create a new Resource Group
        Organization: F&B España, S.A
        Name: Offices
 
    Create a new Resource Category
        Organization: F&B España, S.A
        Name: Space
 
    Create a new Resource
        Organization: F&B España, S.A
        Search Key: CR1
        Name: Conference Room 1
        Resource Type: Generic
        Resource Category: Space
        Reservation Calendar: 2018 Calendar - Hourly
        Product Category: Others
        Capacity: checked
        UOM: Unit
        Default Capacity: 20
        Maximum Capacity: 30
        In Online Section
            Bookable Online: checked
            Product: Alquiler de oficina
            Reservation Controller: Basic Reservation Controller
            Resource Group: Offices
            Bookable by All Users: checked
  
    Add a Resource Reservation widget in Workspace
    Log out / Log in

    Go to Workspace.
        Verify on the Network tab that just one request has been done to <server>/org.openbravo.service.datasource/4591756D1AFA4A85BDA9B85341E3CD24

    In Resource Reservation Widget fill the following information:
        Organization: F&B España, S.A
        Verify the resource group "Offices" is shown
        Expand Offices and verify the resource "Conference Room 1" is shown
        
        Refresh the calendar and verify on the Network tab that just one request has been done to <server>/org.openbravo.service.datasource/4591756D1AFA4A85BDA9B85341E3CD24

        Create a new Resource
        Organization: F&B España, S.A
        Search Key: CR2
        Name: Conference Room 2
        Resource Type: Generic
        Resource Category: Space
        Reservation Calendar: 2018 Calendar - Hourly
        Product Category: Others
        Capacity: checked
        UOM: Unit
        Default Capacity: 20
        Maximum Capacity: 30
        In Online Section
            Bookable Online: checked
            Product: Alquiler de oficina
            Reservation Controller: Basic Reservation Controller
            Resource Group: Offices
            Bookable by All Users: checked
  
      Go back to Resource Reservation Widget and refresh the widget:
      Verify the resource group "Offices" is shown
      Expand Offices and verify the resource "Conference Room 1" is shown and also the last created resource "Conference Room 2".
      Verify on the Network tab that just one request has been done to <server>/org.openbravo.service.datasource/4591756D1AFA4A85BDA9B85341E3CD24
(0107662)
hgbot (developer)
2018-10-30 17:07

Repository: erp/devel/pi
Changeset: 442d564cc84540cdeb3e0771d09bb940977c7445
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Oct 30 13:58:35 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/442d564cc84540cdeb3e0771d09bb940977c7445 [^]

fixes issue 39426: Duplicated DS call after drawing an OBMultiCalendar

  By default OBCalendar has the autoFetchData parameter set to true. This means that when an OBCalendar is first drawn, this.fetchData() is automatically called.

  In the case of the OBCalendar used by the OBMultiCalendar, the data is being manually fetched on its initialization by invoking this.refreshCalendar(). This call together with the call performed with the autoFetchData caused the double DS call.

  In general it is recommended to turn off autoFetchData if we are going to manually call fetchData() at any time. For this reason, we are disabling the autoFetchData in the OBCalendar used by the OBMultiCalendar.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/calendar/ob-multicalendar.js
---
(0107794)
alostale (developer)
2018-11-08 10:00

reviewed + tested
(0108449)
hudsonbot (developer)
2018-12-11 20:22

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2018-10-09 18:12 aaroncalero New Issue
2018-10-09 18:12 aaroncalero Assigned To => Triage Finance
2018-10-10 07:13 guillermogil Tag Attached: Performance
2018-10-11 09:04 Sandrahuguet Assigned To Triage Finance => markmm82
2018-10-13 22:56 markmm82 Status new => scheduled
2018-10-17 04:39 markmm82 Note Added: 0107348
2018-10-17 16:17 Sandrahuguet Assigned To markmm82 => platform
2018-10-17 16:18 Sandrahuguet Status scheduled => acknowledged
2018-10-17 16:18 Sandrahuguet Status acknowledged => scheduled
2018-10-17 16:19 Sandrahuguet File Added: 39426.diff
2018-10-17 16:19 Sandrahuguet Assigned To platform => AugustoMauch
2018-10-17 16:35 Sandrahuguet Steps to Reproduce Updated View Revisions
2018-10-17 18:00 Sandrahuguet Assigned To AugustoMauch => platform
2018-10-17 18:00 Sandrahuguet Status scheduled => feedback
2018-10-17 18:00 Sandrahuguet Status feedback => new
2018-10-19 08:28 caristu Assigned To platform => caristu
2018-10-19 08:28 caristu Status new => scheduled
2018-10-30 17:07 hgbot Checkin
2018-10-30 17:07 hgbot Note Added: 0107662
2018-10-30 17:07 hgbot Status scheduled => resolved
2018-10-30 17:07 hgbot Resolution open => fixed
2018-10-30 17:07 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/442d564cc84540cdeb3e0771d09bb940977c7445 [^]
2018-10-30 17:08 caristu Review Assigned To => alostale
2018-11-08 09:58 alostale Project Modules => Openbravo ERP
2018-11-08 09:58 alostale Modules => Core
2018-11-08 09:58 alostale Triggers an Emergency Pack => No
2018-11-08 09:58 alostale Category Resource and Reservation Management => A. Platform
2018-11-08 10:00 alostale Note Added: 0107794
2018-11-08 10:00 alostale Status resolved => closed
2018-11-08 10:00 alostale Fixed in Version => 3.0PR19Q1
2018-12-11 20:22 hudsonbot Checkin
2018-12-11 20:22 hudsonbot Note Added: 0108449


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker