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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0007375
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] Z. Othersminoralways2009-02-05 09:322011-09-21 22:59
ReporterartemView Statuspublic 
Assigned Toshuehner 
PrioritynormalResolutionout of dateFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version1.6.0_11
OS VersionDatabase versionAnt version1.7.1
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

0007375: Aceptar function in Buscador.java has redundant conditions.

DescriptionAceptar function in Buscador.java has redundant conditions if checkboxes controls are involved into comparison.
For ex. clicking the Master Data Management || Business Partner || Business Partner initiates popup with four fields, three of them are checkboxes.
Function aceptar below in part of condition:

if ((frm.inpParamName.value==null || frm.inpParamName.value=="") && (frm.inpParamIsCustomer.value==null || frm.inpParamIsCustomer.value=="") && (frm.inpParamIsVendor.value==null || frm.inpParamIsVendor.value=="") && (frm.inpParamIsActive.value==null || frm.inpParamIsActive.value=="") ) {
    showJSMessage(1);
    return false;
  }

Value property of checkbox is always set as 'Y' value and it not makes sense to do this check for them at all.
Proposed SolutionRemove checkboxes from the check for mandatory fields.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks feature request 0007236 acknowledgedshuehner Tracking issue: Cleanup for 3.00 

-  Notes
(0013292)
rafaroda (developer)
2009-02-10 10:58

Stefan, from an HTML perspective this seems clearly a bad coding. But could you please confirm that when the filtering is done in Search pop-up it works properly with this tricky code (in which case this would not be a defect)?

Thank you.
(0013482)
shuehner (administrator)
2009-02-13 16:53

Hello Artem,

this if-condition checks if all mandatory fields are filled in and shows an error message otherwise. For html-checkboxes it does not make sense to include them in general as they always have a value (either checked or unchecked) but cannot be "empty".

Idea is to retitle your issue to feature request, remove checkboxes from the check for mandatory fields as it not makes sense to do this check for them at all.

Could you tell me if you see/get any wrong user visible behavior out of this or agree to just remove the part in question to clean up the coding?
(0013535)
artem (reporter)
2009-02-16 15:39

Hello shuehner,

Your notes are reasonable and I've updated the issue according to them.

Thank you.
(0041217)
shuehner (administrator)
2011-09-21 22:59

Hi Artem,

in the new 3.0 major version the filter have been re-designed completely (no special filter popup anymore) but instead the filters are integrated as a line above the grid area. The new implementation does not have this redundant conditions anymore.

The old code is still present but no longer used by default and kind of deprecated and will be removed completely over time.

So marking the issue as out-of-date as its no longer very useful to clean-up the code which is planned to be just removed completely.

- Issue History
Date Modified Username Field Change
2009-02-05 09:32 artem New Issue
2009-02-05 09:32 artem Assigned To => rafaroda
2009-02-05 09:32 artem sf_bug_id 0 => 2567401
2009-02-05 09:32 artem Regression testing => No
2009-02-05 09:33 artem Description Updated
2009-02-10 10:58 rafaroda Note Added: 0013292
2009-02-10 10:58 rafaroda Assigned To rafaroda => shuehner
2009-02-13 16:53 shuehner Note Added: 0013482
2009-02-13 16:53 shuehner Status new => feedback
2009-02-16 15:39 artem Note Added: 0013535
2009-02-16 15:39 artem Status feedback => new
2009-02-16 15:39 artem Type defect => feature request
2009-02-16 15:39 artem Summary Function 'aceptar' performs incorrect comparison => Aceptar function in Buscador.java has redundant conditions.
2009-02-16 15:39 artem Description Updated
2009-02-16 15:39 artem Steps to Reproduce Updated
2009-02-17 12:38 shuehner Relationship added blocks 0007236
2009-02-17 12:38 shuehner Status new => acknowledged
2011-09-21 22:57 shuehner Status acknowledged => scheduled
2011-09-21 22:59 shuehner Note Added: 0041217
2011-09-21 22:59 shuehner Status scheduled => closed
2011-09-21 22:59 shuehner Resolution open => out of date


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker