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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0015494
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] 00. Application dictionarymajoralways2010-12-20 18:452022-02-01 08:08
ReportertgarciaView Statuspublic 
Assigned ToTriage Platform Base 
PriorityhighResolutionopenFixed in Version
StatusacknowledgedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabasePostgreSQLJava version1.6
OS VersionUbuntu 10.10Database version8.4Ant version
Product Version2.50MP24SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0015494: Merge modules verifys inactive dependencys

DescriptionWhen creating a merge, inactive dependencies are taken into account and thus merge is not allowed in situation where it should be
Steps To Reproduce- Create module A and B, and make A depend on B.
- Make that dependecy not active
- Make module C and make it merge A
- Merge cannot be saved
Proposed Solution-- Function: ad_module_merge_trg()

-- DROP FUNCTION ad_module_merge_trg();

CREATE OR REPLACE FUNCTION ad_module_merge_trg()
  RETURNS trigger AS
$BODY$ DECLARE

  /*************************************************************************
  * The contents of this file are subject to the Openbravo Public License
  * Version 1.0 (the "License"), being the Mozilla Public License
  * Version 1.1 with a permitted attribution clause; you may not use this
  * file except in compliance with the License. You may obtain a copy of
  * the License at http://www.openbravo.com/legal/license.html [^]
  * Software distributed under the License is distributed on an "AS IS"
  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  * License for the specific language governing rights and limitations
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
  * All portions are Copyright (C) 2010 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s): ______________________________________.
  ************************************************************************/

  v_Aux NUMERIC;
   
BEGIN

  IF AD_isTriggerEnabled()='N' THEN IF TG_OP = 'DELETE' THEN RETURN OLD; ELSE RETURN NEW; END IF;
  END IF;
  
  SELECT COUNT(*)
    INTO v_Aux
    FROM AD_MODULE_DEPENDENCY
   WHERE AD_Dependent_Module_ID = new.Merged_Module_UUID
   AND AD_MODULE_DEPENDENCY.ISACTIVE = 'Y';
   
  IF v_aux>0 THEN
    RAISE EXCEPTION '%', '@CannotMergeDependency@'; --OBTG:-20000--
  END IF;

IF TG_OP = 'DELETE' THEN RETURN OLD; ELSE RETURN NEW; END IF;

END

; $BODY$
  LANGUAGE plpgsql VOLATILE
  COST 100;
ALTER FUNCTION ad_module_merge_trg() OWNER TO tad;
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0046677)
alostale (manager)
2012-03-23 12:11

All checks for activeness need to be verified.
(0052461)
AugustoMauch (administrator)
2012-09-24 23:23

Effort: 2
Impact: low
Plan: short

- Issue History
Date Modified Username Field Change
2010-12-20 18:45 tgarcia New Issue
2010-12-20 18:45 tgarcia Assigned To => alostale
2010-12-20 18:45 tgarcia Modules => Core
2010-12-27 07:29 alostale Status new => scheduled
2010-12-27 07:29 alostale fix_in_branch => pi
2012-03-23 12:11 alostale Note Added: 0046677
2012-03-23 12:11 alostale Type defect => design defect
2012-03-23 12:11 alostale fix_in_branch pi =>
2012-09-24 23:23 AugustoMauch Note Added: 0052461
2012-09-24 23:23 AugustoMauch Priority normal => high
2017-03-31 14:36 alostale Status scheduled => acknowledged
2017-04-10 14:34 alostale Assigned To alostale => platform
2022-02-01 08:08 alostale Assigned To platform => Triage Platform Base


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker