Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029064Openbravo ERPA. Platformpublic2015-02-25 13:152015-05-07 22:16
caristu 
NaroaIriarte 
highmajoralways
closedfixed 
5
pi 
3.0PR15Q33.0PR15Q3 
alostale
Core
No
0029064: When you create a note, the created record in table obuiapp_note has context organization instead of document organization
When you create a note, the created record in table obuiapp_note has context organization instead of document organization
-Login to ERP
-Your context should have "EspaƱa Norte" organization
-Go to window sales order and select an order with organization "F&B US East Coast"
-Create a Note for that order
-Login with a role that only have access to "F&B US East Coast" verify that can not see the new Note

The problem is that created record in table obuiapp_note has context organization instead of document organization.
It will be necessary a modulescript
No tags attached.
related to defect 0028842 closed NaroaIriarte When you attach a file, the created record in table c_file has context organization instead of document organization 
has duplicate defect 0029057 closed AugustoMauch When you create a note, the created record in table has context organization instead of document organization 
Issue History
2015-02-25 13:15caristuNew Issue
2015-02-25 13:15caristuAssigned To => AugustoMauch
2015-02-25 13:15caristuModules => Core
2015-02-25 13:15caristuResolution time => 1431468000
2015-02-25 13:15caristuTriggers an Emergency Pack => No
2015-02-25 13:15caristuRelationship addedrelated to 0028842
2015-02-25 13:16caristuIssue Monitored: networkb
2015-02-25 13:16caristuversion => pi
2015-02-25 13:16caristuTarget Version => 3.0PR15Q2
2015-02-25 13:19jecharriRelationship addedhas duplicate 0029057
2015-02-25 16:34alostaleStatusnew => scheduled
2015-02-25 16:34alostaleAssigned ToAugustoMauch => NaroaIriarte
2015-02-25 16:34alostalefix_in_branch => pi
2015-03-13 10:35jonalegriaesarteTarget Version3.0PR15Q2 => 3.0PR15Q3
2015-03-13 10:35jonalegriaesartefix_in_branchpi =>
2015-03-30 08:30alostaleSeverityminor => major
2015-04-22 17:01hgbotCheckin
2015-04-22 17:01hgbotNote Added: 0076698
2015-04-22 17:01hgbotStatusscheduled => resolved
2015-04-22 17:01hgbotResolutionopen => fixed
2015-04-22 17:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f919925114f0ef8544e4137a66ecbb8d1c083128 [^]
2015-04-22 17:01hgbotCheckin
2015-04-22 17:01hgbotNote Added: 0076699
2015-04-24 12:54alostaleReview Assigned To => alostale
2015-04-24 13:48alostaleNote Added: 0076752
2015-04-24 13:48alostaleStatusresolved => closed
2015-04-24 13:48alostaleFixed in Version => 3.0PR15Q3
2015-04-24 14:07hgbotCheckin
2015-04-24 14:07hgbotNote Added: 0076753
2015-05-07 22:16hudsonbotCheckin
2015-05-07 22:16hudsonbotNote Added: 0077143
2015-05-07 22:16hudsonbotCheckin
2015-05-07 22:16hudsonbotNote Added: 0077144
2015-05-07 22:16hudsonbotCheckin
2015-05-07 22:16hudsonbotNote Added: 0077154

Notes
(0076698)
hgbot   
2015-04-22 17:01   
Repository: erp/devel/pi
Changeset: f919925114f0ef8544e4137a66ecbb8d1c083128
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Wed Apr 22 16:57:29 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f919925114f0ef8544e4137a66ecbb8d1c083128 [^]

Fixed issue 29064:There are problems with the organization of the notes.

There were two problems:
First: When a note was created, it had context organization instead of document organization.
To fix this, a new field which stores the note's organization has been created in the "ob-view-form-notes.js".
Second: If a note was added with an organization and after that the organization of the note
was changed, there were problems to handle it.
A new manual datasource has been created for handling the fetch,add and remove operations of the notes,
making sure that the organization filter is disabled. So, we grant the fact that if a user of one
organization creates a note and after that the organization of the note is changed to another one which
the user has not access, the user will be able to see or delete the note.

---
M modules/org.openbravo.client.application/src-db/database/sourcedata/OBSERDS_DATASOURCE.xml
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-notes.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DefaultDataSourceService.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
A modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/NoteDataSource.java
---
(0076699)
hgbot   
2015-04-22 17:01   
Repository: erp/devel/pi
Changeset: 347fbcf3401ff71f69a642171b624869b9ba8865
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Wed Apr 22 16:58:41 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/347fbcf3401ff71f69a642171b624869b9ba8865 [^]

Related with issue 29064: Added test for the new NoteDataSource

A test for making sure that the new manual data source for the notes works properly.
It does the fetch, add and remove methods of the NoteDataSource.java.
The testFetchNotes test has a user of an American organization which creates a new note, so the note's
organization is the same American organization. After that the organization of the note is changed to
another one which is a Spanish organization for making sure that the two organization are divergent.
After that a fetch is done, now, the user has no access to the new organization of the note, but it have
to be possible fetching the note. This is what this test does, a fetch making sure that the filter by the
organizations is not done.
The class DatasourceTestUtil has been modified for the correct performance of the testRemoveNotes.

---
M src-test/src/org/openbravo/test/AllWebserviceTests.java
M src-test/src/org/openbravo/test/datasource/DatasourceTestUtil.java
A src-test/src/org/openbravo/test/datasource/TestNoteDatasource.java
---
(0076752)
alostale   
2015-04-24 13:48   
Code review:
  * addFetchParameters [1] shouldn't change its visibility from private to protected
 
Tested:
  * New notes are created in their document's organization
  * Both for new and old notes created in an incorrect organization:
     - They are properly counted in Notes section title
     - They can be seen
     - They can be deleted


[1] https://code.openbravo.com/erp/devel/pi/rev/f919925114f0ef8544e4137a66ecbb8d1c083128#l5.34 [^]
(0076753)
hgbot   
2015-04-24 14:07   
Repository: erp/devel/pi
Changeset: 7eac27cd74409e5afa62baa57a45236d898dba4d
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Fri Apr 24 14:04:00 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7eac27cd74409e5afa62baa57a45236d898dba4d [^]

Related with issue 29064: Restricted the method's visbilty.

The method's visibility has been modified from protected to private because the method
was only used in the current class.

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DefaultDataSourceService.java
---
(0077143)
hudsonbot   
2015-05-07 22:16   
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/a1817f84bd8b [^]
Maturity status: Test
(0077144)
hudsonbot   
2015-05-07 22:16   
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/a1817f84bd8b [^]
Maturity status: Test
(0077154)
hudsonbot   
2015-05-07 22:16   
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/a1817f84bd8b [^]
Maturity status: Test