Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0041882Openbravo ERP00. Application dictionarypublic2019-09-25 10:062019-12-12 23:01
Leyre 
markmm82 
normalminoralways
closedfixed 
5
 
3.0PR20Q1 
Sandrahuguet
Core
No
0041882: There are fields with the same sequence number for the same window/tab
There are fields with the same sequence number for the same window/tab
We have executed this SQL:

select max(m.javapackage), min(m.javapackage), f.ad_tab_id, w.name as window,f.seqno, t.name as tab, max(f.name), min(f.name)
from ad_tab t, ad_window w, ad_field f, ad_column c, ad_module m
where f.ad_column_id = c.ad_column_id and f.ad_tab_id=t.ad_tab_id and t.ad_window_id=w.ad_window_id
and c.ad_reference_id <> '28'
and f.isdisplayed = 'Y'
and f.seqno is not null
and f.ad_module_id=m.ad_module_id and f.isshowninstatusbar='N'
group by f.ad_tab_id, f.seqno, w.name, t.name
having count(1) > 1
order by 2,1;


And we have verified that there are fields with the same sequence number in the same window/tab. Look at the attached document.
No tags attached.
related to defect 0041652 new platform If more than one displayed field in a tab have the same sequence number, the fields can be displayed in different order in form 
csv secuencenumber.csv (2,983) 2019-09-25 10:06
https://issues.openbravo.com/file_download.php?file_id=13324&type=bug
Issue History
2019-09-25 10:06LeyreNew Issue
2019-09-25 10:06LeyreAssigned To => platform
2019-09-25 10:06LeyreFile Added: secuencenumber.csv
2019-09-25 10:06LeyreModules => Core
2019-09-25 10:06LeyreResolution time => 1571176800
2019-09-25 10:06LeyreTriggers an Emergency Pack => No
2019-09-25 10:14LeyrePriorityhigh => normal
2019-09-25 10:14LeyreSeveritymajor => minor
2019-09-25 10:14LeyreRelationship addedrelated to 0041652
2019-09-27 11:14alostaleAssigned Toplatform => Triage Finance
2019-10-08 15:03markmm82Assigned ToTriage Finance => markmm82
2019-10-08 15:03markmm82Statusnew => scheduled
2019-10-08 15:27markmm82Note Added: 0114950
2019-10-08 15:27markmm82Assigned Tomarkmm82 => Leyre
2019-10-08 15:27markmm82Statusscheduled => feedback
2019-10-09 02:12markmm82Assigned ToLeyre => markmm82
2019-10-09 02:12markmm82Statusfeedback => scheduled
2019-10-09 02:12markmm82Note Deleted: 0114950
2019-10-09 02:18markmm82Note Added: 0114970
2019-10-09 02:23markmm82Note Added: 0114971
2019-10-09 02:36markmm82Note Edited: 0114970bug_revision_view_page.php?bugnote_id=0114970#r19452
2019-10-14 16:44hgbotCheckin
2019-10-14 16:44hgbotNote Added: 0115073
2019-10-14 16:44hgbotStatusscheduled => resolved
2019-10-14 16:44hgbotResolutionopen => fixed
2019-10-14 16:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b52f19ccec69d400c85549332d1dd1014aabe6db [^]
2019-10-14 16:48SandrahuguetReview Assigned To => Sandrahuguet
2019-10-14 16:48SandrahuguetNote Added: 0115074
2019-10-14 16:48SandrahuguetStatusresolved => closed
2019-10-14 16:48SandrahuguetFixed in Version => 3.0PR20Q1
2019-12-12 23:01hudsonbotCheckin
2019-12-12 23:01hudsonbotNote Added: 0116241

Notes
(0114970)
markmm82   
2019-10-09 02:18   
(edited on: 2019-10-09 02:36)
To get those fields with the same sequence number at same tab we execute the following query:

select w.name as window, t.name as tab, f.seqno, f.name as field, f.ad_field_id, f.ad_tab_id
  --, m.javapackage
from ad_window w
  inner join ad_tab t on w.ad_window_id=t.ad_window_id
  inner join ad_field f on t.ad_tab_id=f.ad_tab_id
  inner join ad_column c on f.ad_column_id = c.ad_column_id
  --inner join ad_module m on f.ad_module_id=m.ad_module_id
where c.ad_reference_id <> '28'
  and f.isdisplayed = 'Y'
  and f.seqno is not null
  and f.isshowninstatusbar='N'
  and f.isactive='Y'
  and exists (
    select 1
    from ad_field f2
      inner join ad_column c2 on f2.ad_column_id = c2.ad_column_id
    where
      c2.ad_reference_id <> '28'
      and f2.seqno = f.seqno
      and f2.ad_tab_id = f.ad_tab_id
      and f2.ad_field_id <> f.ad_field_id
      and f2.isdisplayed = 'Y'
      and f2.isactive='Y'
  )
order by w.name, t.name, f.seqno;

It gets the records with conflicts.
Notice is needed to update the sequence numbers of those fields having the same value in the same tab and window but just when they can cause visual conflicts having the same sequence on forms or grids. Fields to be considered are those: with active status, that are displayed, are not shown in status bar and the related column reference is not a Button (different than '28').

(0114971)
markmm82   
2019-10-09 02:23   
Test Plan:
Execute the following query and notice it doesn't gets any record:
select w.name as window, t.name as tab, f.seqno, f.name as field, f.ad_field_id, f.ad_tab_id
  --, m.javapackage
from ad_window w
  inner join ad_tab t on w.ad_window_id=t.ad_window_id
  inner join ad_field f on t.ad_tab_id=f.ad_tab_id
  inner join ad_column c on f.ad_column_id = c.ad_column_id
  --inner join ad_module m on f.ad_module_id=m.ad_module_id
where c.ad_reference_id <> '28'
  and f.isdisplayed = 'Y'
  and f.seqno is not null
  and f.isshowninstatusbar='N'
  and f.isactive='Y'
  and exists (
    select 1
    from ad_field f2
      inner join ad_column c2 on f2.ad_column_id = c2.ad_column_id
    where
      c2.ad_reference_id <> '28'
      and f2.seqno = f.seqno
      and f2.ad_tab_id = f.ad_tab_id
      and f2.ad_field_id <> f.ad_field_id
      and f2.isdisplayed = 'Y'
      and f2.isactive='Y'
  )
order by w.name, t.name, f.seqno;
(0115073)
hgbot   
2019-10-14 16:44   
Repository: erp/devel/pi
Changeset: b52f19ccec69d400c85549332d1dd1014aabe6db
Author: Mark Molina <mark.molina <at> doceleguas.com>
Date: Tue Oct 08 21:11:06 2019 -0300
URL: http://code.openbravo.com/erp/devel/pi/rev/b52f19ccec69d400c85549332d1dd1014aabe6db [^]

Fixes issue 41882: Changed sequence number to those fields with the same value
for the same window/tab.

Were updated the sequence numbers of those fields having the same value in the same
tab and window.

Were only updated those wich can cause visual conflict having the same sequence at
be rendered. Updated fields were those: active, displayed, not shown in status bar and
with a related column reference different than '28' (Button).

---
M src-db/database/sourcedata/AD_FIELD.xml
---
(0115074)
Sandrahuguet   
2019-10-14 16:48   
verified
(0116241)
hudsonbot   
2019-12-12 23:01   
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/954d2b7a66fb [^]
Maturity status: Test