Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0027670 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | always | 2014-09-24 12:52 | 2014-12-30 23:27 | |||
Reporter | caristu | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | high | Resolution | fixed | Fixed in Version | 3.0PR15Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 87a7c215c826 | ||||
Projection | none | ETA | none | Target Version | 3.0PR15Q1 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | pi | SCM revision | ||||||
Review Assigned To | dbaz | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0027670: Time fields do not have the correct style in read only mode | |||||||
Description | Time fields do not have the correct style in read only mode (see attached). Both Absolute and Standard time fields are having this issue. | |||||||
Steps To Reproduce | 1) Create a new field of type Time/Absolute Time in any tab. 2) Put the UI Pattern of the tab where you have placed this new field as Read Only 3) Recompile the system 4) Access to the tab, notice that the read only style of the Absolute Time field is not the correct one. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ATReadOnlyStyle.png [^] (3,687 bytes) 2014-09-24 12:52
WithData.png [^] (4,358 bytes) 2014-09-25 19:17 issue-27670.export [^] (1,478 bytes) 2014-12-10 11:38 | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||||||||||||||||
|
Notes | |
(0070366) shankarb (reporter) 2014-09-25 11:53 |
Issue reproducible only in case the field does not have any value. |
(0070399) caristu (developer) 2014-09-25 19:16 edited on: 2014-09-25 19:18 |
Hi Shankar, I am able to reproduce it with value and setting the column as mandatory (see attached) |
(0072005) hgbot (developer) 2014-11-25 19:25 |
Repository: erp/devel/pi Changeset: 02f377fd13c624219b12b51e05d6f82d4a9a7d53 Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com> Date: Tue Nov 25 19:04:33 2014 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/02f377fd13c624219b12b51e05d6f82d4a9a7d53 [^] Fixes issue 27670: Time fields do not have the correct style in read only mode The problem was the following. Absolute and Standard time fields did not have the correct style in read only mode. It has been resolved adding a method that applies correct style in read only mode, it means, it has been added "Disabled" at the end of style name in read only mode. --- M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js --- |
(0072129) alostale (manager) 2014-11-28 12:59 |
code review: -prevent extra if nesting by using if () { ... } else if () { ... } istead of if () { ... } else { if () { //unnecessary nesting } } -OB coding convention: use single quotes for JavaScript strings [1]: "Disabled" should be 'Disabled' not reopening it as they are minor style issues. [1] http://wiki.openbravo.com/wiki/JavaScript_Coding_Conventions#Single_Quotes [^] |
(0072135) hgbot (developer) 2014-11-28 14:05 |
Repository: erp/devel/pi Changeset: ba175225033f84b8cff0804c28c2b6755395dcb4 Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com> Date: Fri Nov 28 14:04:22 2014 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/ba175225033f84b8cff0804c28c2b6755395dcb4 [^] Related issue 27670: Added two small refactoring. It has been prevented an extra if. Besides, it has been used OB coding convection using single quotes. --- M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js --- |
(0072184) alostale (manager) 2014-12-01 12:09 |
Reopening: Though the readonly UI looks fine, it is still possible to edit time and absolute time references when they are read only. |
(0072382) inigosanchez (developer) 2014-12-10 11:40 |
It has been resolved in attached export file. |
(0072395) alostale (manager) 2014-12-10 13:24 edited on: 2014-12-10 13:25 |
Testing attached export. 2 problems found: | UI | can't edit ---------------------------------------------------------------------- 1. Read Only Role access | OK | OK 2. Non editable org | FAIL: text box | OK 3. Read only window (in AD) | OK | OK 4. Read only field (in AD) | OK | OK 5. Read only logic | FAIL: text box | OK |
(0072455) hgbot (developer) 2014-12-12 14:56 |
Repository: erp/devel/pi Changeset: 1339ca00c158f8c91108a2f63a0b031efdc85d0a Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Fri Dec 12 14:44:04 2014 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/1339ca00c158f8c91108a2f63a0b031efdc85d0a [^] fixed bug 27670: time refrerence has no correct style when it is readonly The problem is caused by the incorrect management SC client does for styles in this case. TimeItem contains an inner TextItem. In case the TimeItem defines a textBoxStyle property, it is always applied to the inner TextItem without considering if it is active. Current fix overwrites SC default behavior so that is taken into account. --- M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js --- |
(0072457) alostale (manager) 2014-12-12 15:01 |
Tested with all time references (time, date-time, absolute time, absolute date-time), with mandatory and non-mandatory fields, disabling the fields in different manners: by readonly field (AD), read only logic, read only access at role level, non editable org. |
(0072547) dbaz (developer) 2014-12-16 13:49 |
Several problems detected: In priority order 1) If there is an issue identified in the Smartclient side, it should be reported to Smartclient. In the same way we invest a lot of time ensuring that known regressions doesn't happen again, we should ensure that it doesn't happen the first time. Doing fixes like this in our side have demonstrated that is a bomb once we decide to upgrade the Smartclient library, so at least in a first action should be report it to them and try to backport the fix. Only if this solution is not feasible should we try to do the fix in our side. 2) https://code.openbravo.com/erp/devel/pi/rev/1339ca00c158f8c91108a2f63a0b031efdc85d0a#l1.19 [^] A proper solution would be return me.getClass().getInstanceProperty('textBoxStyle') + (me.isDisabled() ? 'Disabled' : (me.required ? 'Required' : '')); With this we ensure that if we create a child class of OBTimeItem with its own styles, at this point they will not be overwritten by this code. 3) https://code.openbravo.com/erp/devel/pi/rev/1339ca00c158f8c91108a2f63a0b031efdc85d0a#l1.17 [^] OB.Styles.OBFormField.OBTimeItem it seems that is 'undefined' Anyway, here it is the same conflict than in the point before: it makes impossible create a new OBTimeItem child with its own new style. 4) Install "org.openbravo.platform.features" module Go to "EM_Obpf_Stdtime" and "EM_Obpf_Abs_Time" columns of "C_Order" table and set "true" in "Read Only Logic" field. Save and do "ant smartbuild" Go to Sales Order window Notice that although the "Absolute Time" and "Relative Time" look like read-only, you can write in them At this point I have not developed more tests. |
(0072566) alostale (manager) 2014-12-16 16:41 |
Reported to SC http://forums.smartclient.com/showthread.php?p=127434 [^] |
(0072569) hgbot (developer) 2014-12-16 17:24 |
Repository: erp/devel/pi Changeset: 87a7c215c8263c417f957a4f1672b90a69e475c2 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Tue Dec 16 17:23:54 2014 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/87a7c215c8263c417f957a4f1672b90a69e475c2 [^] fixed bug 27670: time refrerence has no correct style when it is readonly -refactored previous solution to be easier to extend: -no hardcoded class references (OBTimeItem) -using changeDefaults instead of modifying init method -fixed editable field with readonly ui for readonly logic --- M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js --- |
(0072636) dbaz (developer) 2014-12-17 13:25 |
Tested @ changeset 25557 - 87a7c215c826 |
(0073141) hudsonbot (developer) 2014-12-30 23:26 |
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/6525fe229e06 [^] Maturity status: Test |
(0073154) hudsonbot (developer) 2014-12-30 23:26 |
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/6525fe229e06 [^] Maturity status: Test |
(0073212) hudsonbot (developer) 2014-12-30 23:27 |
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/6525fe229e06 [^] Maturity status: Test |
(0073224) hudsonbot (developer) 2014-12-30 23:27 |
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/6525fe229e06 [^] Maturity status: Test |
Issue History | |||
Date Modified | Username | Field | Change |
2014-09-24 12:52 | caristu | New Issue | |
2014-09-24 12:52 | caristu | Assigned To | => AugustoMauch |
2014-09-24 12:52 | caristu | File Added: ATReadOnlyStyle.png | |
2014-09-24 12:52 | caristu | Modules | => Core |
2014-09-24 12:52 | caristu | Resolution time | => 1418079600 |
2014-09-24 12:52 | caristu | Triggers an Emergency Pack | => No |
2014-09-24 12:52 | caristu | Issue Monitored: networkb | |
2014-09-24 12:55 | caristu | Steps to Reproduce Updated | View Revisions |
2014-09-25 08:13 | shankarb | Assigned To | AugustoMauch => shankarb |
2014-09-25 11:53 | shankarb | Note Added: 0070366 | |
2014-09-25 19:17 | caristu | Note Added: 0070399 | |
2014-09-25 19:17 | caristu | File Added: WithData.png | |
2014-09-25 19:18 | caristu | Note Edited: 0070399 | View Revisions |
2014-09-26 12:10 | shankarb | Summary | Absolute Time fields do not have the correct style in read only mode => Time fields do not have the correct style in read only mode |
2014-09-26 12:10 | shankarb | Description Updated | View Revisions |
2014-09-26 12:10 | shankarb | Steps to Reproduce Updated | View Revisions |
2014-09-29 08:31 | alostale | Target Version | 3.0PR14Q4 => 3.0PR15Q1 |
2014-09-30 10:58 | shankarb | Assigned To | shankarb => AugustoMauch |
2014-11-21 10:51 | alostale | Assigned To | AugustoMauch => inigosanchez |
2014-11-25 19:25 | hgbot | Checkin | |
2014-11-25 19:25 | hgbot | Note Added: 0072005 | |
2014-11-25 19:25 | hgbot | Status | new => resolved |
2014-11-25 19:25 | hgbot | Resolution | open => fixed |
2014-11-25 19:25 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/02f377fd13c624219b12b51e05d6f82d4a9a7d53 [^] |
2014-11-25 19:26 | inigosanchez | Status | resolved => new |
2014-11-25 19:26 | inigosanchez | Resolution | fixed => open |
2014-11-25 19:26 | inigosanchez | Issue Monitored: alostale | |
2014-11-25 19:27 | inigosanchez | Review Assigned To | => alostale |
2014-11-25 19:27 | inigosanchez | Status | new => scheduled |
2014-11-25 19:27 | inigosanchez | Resolution | open => fixed |
2014-11-25 19:27 | inigosanchez | Status | scheduled => resolved |
2014-11-28 12:59 | alostale | Note Added: 0072129 | |
2014-11-28 14:05 | hgbot | Checkin | |
2014-11-28 14:05 | hgbot | Note Added: 0072135 | |
2014-12-01 12:09 | alostale | Note Added: 0072184 | |
2014-12-01 12:09 | alostale | Status | resolved => new |
2014-12-01 12:09 | alostale | Resolution | fixed => open |
2014-12-10 11:38 | inigosanchez | File Added: issue-27670.export | |
2014-12-10 11:40 | inigosanchez | Note Added: 0072382 | |
2014-12-10 13:24 | alostale | Note Added: 0072395 | |
2014-12-10 13:25 | alostale | Note Edited: 0072395 | View Revisions |
2014-12-12 12:51 | alostale | Relationship added | related to 0025916 |
2014-12-12 14:39 | alostale | Relationship added | related to 0025914 |
2014-12-12 14:47 | alostale | Assigned To | inigosanchez => alostale |
2014-12-12 14:48 | alostale | Review Assigned To | alostale => dbaz |
2014-12-12 14:48 | alostale | Issue Monitored: dbaz | |
2014-12-12 14:56 | hgbot | Checkin | |
2014-12-12 14:56 | hgbot | Note Added: 0072455 | |
2014-12-12 14:56 | hgbot | Status | new => resolved |
2014-12-12 14:56 | hgbot | Resolution | open => fixed |
2014-12-12 14:56 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/02f377fd13c624219b12b51e05d6f82d4a9a7d53 [^] => http://code.openbravo.com/erp/devel/pi/rev/1339ca00c158f8c91108a2f63a0b031efdc85d0a [^] |
2014-12-12 15:01 | alostale | Note Added: 0072457 | |
2014-12-16 13:49 | dbaz | Note Added: 0072547 | |
2014-12-16 13:49 | dbaz | Status | resolved => new |
2014-12-16 13:49 | dbaz | Resolution | fixed => open |
2014-12-16 16:41 | alostale | Note Added: 0072566 | |
2014-12-16 17:24 | hgbot | Checkin | |
2014-12-16 17:24 | hgbot | Note Added: 0072569 | |
2014-12-16 17:24 | hgbot | Status | new => resolved |
2014-12-16 17:24 | hgbot | Resolution | open => fixed |
2014-12-16 17:24 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/1339ca00c158f8c91108a2f63a0b031efdc85d0a [^] => http://code.openbravo.com/erp/devel/pi/rev/87a7c215c8263c417f957a4f1672b90a69e475c2 [^] |
2014-12-17 13:25 | dbaz | Note Added: 0072636 | |
2014-12-17 13:25 | dbaz | Status | resolved => closed |
2014-12-17 13:25 | dbaz | Fixed in Version | => 3.0PR15Q1 |
2014-12-30 23:26 | hudsonbot | Checkin | |
2014-12-30 23:26 | hudsonbot | Note Added: 0073141 | |
2014-12-30 23:26 | hudsonbot | Checkin | |
2014-12-30 23:26 | hudsonbot | Note Added: 0073154 | |
2014-12-30 23:27 | hudsonbot | Checkin | |
2014-12-30 23:27 | hudsonbot | Note Added: 0073212 | |
2014-12-30 23:27 | hudsonbot | Checkin | |
2014-12-30 23:27 | hudsonbot | Note Added: 0073224 | |
2015-04-10 13:16 | caristu | Relationship added | related to 0029561 |
Copyright © 2000 - 2009 MantisBT Group |