Openbravo Issue Tracking System - Openbravo ERP  | 
| View Issue Details | 
  | 
| ID | Project | Category | View Status | Date Submitted | Last Update | 
| 0043249 | Openbravo ERP | A. Platform | public | 2020-02-18 12:43 | 2020-03-06 11:34 | 
  | 
| Reporter | inigo_lerga |   | 
| Assigned To | inigo_lerga |   | 
| Priority | normal | Severity | minor | Reproducibility | have not tried | 
| Status | closed | Resolution | fixed |   | 
| Platform |  | OS | 5 | OS Version |  | 
| Product Version |  |   | 
| Target Version |  | Fixed in Version | 3.0PR20Q2 |   | 
| Merge Request Status |  | 
| Review Assigned To | dmiguelez | 
| OBNetwork customer | No | 
| Web browser |  | 
| Modules | Core | 
| Support ticket |  | 
| Regression level |  | 
| Regression date |  | 
| Regression introduced in release |  | 
| Regression introduced by commit |  | 
| Triggers an Emergency Pack | No | 
  | 
| Summary | 0043249: Apply new HQL Style in RMInsertOrphanLine.java | 
| Description | RMInsertOrphanLine.java has 2 HQL queries with: 
- the HQL is hard to read because of formatting 
- and it is mixing txt and i.e PROPERTY_ID constant which is not recommended by default | 
| Steps To Reproduce | - | 
| Proposed Solution | Follow new format as in http://wiki.openbravo.com/wiki/HQL_Coding_Conventions [^] | 
| Additional Information |  | 
| Tags | No tags attached. | 
| Relationships | | related to  | design defect  | 0041287 |   | acknowledged  | Triage Platform Base  | Tracking issue: Convert HQL to apply new style  |  
  | 
| Attached Files |  | 
  | 
| Issue History | 
| Date Modified | Username | Field | Change | 
| 2020-02-18 12:43 | inigo_lerga | New Issue |  | 
| 2020-02-18 12:43 | inigo_lerga | Assigned To |  => platform | 
| 2020-02-18 12:43 | inigo_lerga | OBNetwork customer |  => No | 
| 2020-02-18 12:43 | inigo_lerga | Modules |  => Core | 
| 2020-02-18 12:43 | inigo_lerga | Triggers an Emergency Pack |  => No | 
| 2020-02-18 12:44 | inigo_lerga | Assigned To | platform => inigo_lerga | 
| 2020-02-18 12:44 | inigo_lerga | Relationship added | related to 0041287 | 
| 2020-02-18 14:24 | inigo_lerga | Status | new => scheduled | 
| 2020-02-18 15:36 | inigo_lerga | Note Added: 0117917 |  | 
| 2020-03-06 11:33 | hgbot | Checkin |  | 
| 2020-03-06 11:33 | hgbot | Note Added: 0118360 |  | 
| 2020-03-06 11:33 | hgbot | Status | scheduled => resolved | 
| 2020-03-06 11:33 | hgbot | Resolution | open => fixed | 
| 2020-03-06 11:33 | hgbot | Fixed in SCM revision |  => http://code.openbravo.com/erp/devel/pi/rev/a81b4b890f277763b06be015fee0a56396657b62 [^] | 
| 2020-03-06 11:33 | hgbot | Checkin |  | 
| 2020-03-06 11:33 | hgbot | Note Added: 0118361 |  | 
| 2020-03-06 11:33 | hgbot | Checkin |  | 
| 2020-03-06 11:33 | hgbot | Note Added: 0118362 |  | 
| 2020-03-06 11:34 | dmiguelez | Review Assigned To |  => dmiguelez | 
| 2020-03-06 11:34 | dmiguelez | Note Added: 0118363 |  | 
| 2020-03-06 11:34 | dmiguelez | Status | resolved => closed | 
| 2020-03-06 11:34 | dmiguelez | Fixed in Version |  => 3.0PR20Q2 | 
	| 
		Notes	 | 
	
		 
	 | 
	
		
		
			| 
				(0117917)
			 | 
		 
		
			| 
				inigo_lerga   
			 | 
		 
		
			| 
				2020-02-18 15:36   
							 | 
		 
		 
	 | 
	
		
		
			
				--Test Plan Mantis HQL queries-- 
As the F&B International Group Admin role: 
    - Go to the Return from Customer window (with the 
      "RM Allow Orphan Line" preference enabled) Admin 
      create a new record with any Business Partner. 
    - Press the Insert Orphan Line button. 
      In the popup window select any product and any  
      quantity in the returned field. Press the Ok button. 
       
    #In this moment the modified HQL is executed#			 | 
		 
		 
	 | 
	
		 
	 | 
	
		
		
			| 
				(0118360)
			 | 
		 
		
			| 
				hgbot   
			 | 
		 
		
			| 
				2020-03-06 11:33   
							 | 
		 
		 
	 | 
	
		
	 | 
	
		 
	 | 
	
		
		
			| 
				(0118361)
			 | 
		 
		
			| 
				hgbot   
			 | 
		 
		
			| 
				2020-03-06 11:33   
							 | 
		 
		 
	 | 
	
		
		
			
				Repository: erp/devel/pi 
Changeset: 002d9667ce1ed344ded464670e5ff653ac3c8980 
Author: Iñigo Lerga <inigo.lerga <at> openbravo.com> 
Date: Tue Feb 18 15:30:58 2020 +0100 
URL: http://code.openbravo.com/erp/devel/pi/rev/002d9667ce1ed344ded464670e5ff653ac3c8980 [^] 
 
related to ISSUE-43249: Applied Sonarlint suggestions and more 
 
Sonarlint suggestions applied. 
Finals added. 
Code refactored to be more legible in different methods. 
 
--- 
M src/org/openbravo/erpCommon/ad_actionButton/RMInsertOrphanLine.java 
--- 
			 | 
		 
		 
	 | 
	
		 
	 | 
	
		
		
			| 
				(0118362)
			 | 
		 
		
			| 
				hgbot   
			 | 
		 
		
			| 
				2020-03-06 11:33   
							 | 
		 
		 
	 | 
	
		
		
			
				Repository: erp/devel/pi 
Changeset: 6a58990c053eae73f3b3412b7e599d111e1c6336 
Author: David Miguelez <david.miguelez <at> openbravo.com> 
Date: Fri Feb 28 09:05:35 2020 +0100 
URL: http://code.openbravo.com/erp/devel/pi/rev/6a58990c053eae73f3b3412b7e599d111e1c6336 [^] 
 
Related to ISSUE-43249: Code Review changes: 
* Use id's instead of objects in hql queries 
* Reorder methods 
* Moved logic from methods into main flow as it is important 
  to understand the exceptions that are being managed, and those 
  were hidden in the new methods. 
 
--- 
M src/org/openbravo/erpCommon/ad_actionButton/RMInsertOrphanLine.java 
--- 
			 | 
		 
		 
	 | 
	
		 
	 | 
	| 
		
	 | 
	
		
	 |