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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0004072
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 01. General setupminorhave not tried2008-06-19 12:452008-12-08 18:26
ReporterplujanView Statuspublic 
Assigned ToHennadzi 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision5740
ProjectionnoneETAnoneTarget Version
OSWindowsDatabasePostgreSQLJava versiondon't know
OS VersionXPsp2Database version8.2.7Ant versiondon't know
Product Version2.40alpha-r3SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0004072: I get an error message trying to delete a Role selected as default by an user

DescriptionI get an error message trying to delete a Role selected as default by an user. See steps.
Steps To Reproduce1. Go General Setup || Security || Role || Role
2. Create a new Role. Organization * and User level Client.
3. Assign it to a user
4. Log in with the user assigned and choose this role. Select it as default. An error message appears because there is no Org access for the role.
5. Logout and try to login with the same user. You can not.
6. Log in with previous user and go delete everything related to the role. When trying to delete the Role, although Linked Items shows nothing, you can not delete the role. The message is not correct, both in style (is a warning and should be an error) and message is "zero". See attach.
Proposed SolutionIf you check the log, you will see:

ERROR org.openbravo.erpCommon.utility.ExecuteQuery - SQLException:org.postgresql.util.PSQLException: ERROR: update or delete on table "ad_role" violates foreign key constraint "adrole_aduserdefault" on table "ad_user"
  Detail: Key (ad_role_id)=(1000008) is still referenced from table "ad_user".

So the solution would be capturing the failing constraint and showing a proper message. Please note that this solution should be applied to all constraints, not just the reported one.
TagsNo tags attached.
Attached Filesjpg file icon r240r3_BUG_DeletingARole.JPG [^] (91,880 bytes) 2008-06-19 12:45

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0007962)
cromero (reporter)
2008-06-23 18:09

The message for each constraint should be


adclient_aduserdefault:"This record cannot be deleted because a user has associated this client"
adlanguage_aduserdefault:This record cannot be deleted because a user has associated this language"
adorg_aduserdefault:This record cannot be deleted because a user has associated this organization"
adrole_aduserdefault:This record cannot be deleted because a user has associated this role"
mwarehouse_aduserdefault: This record cannot be deleted because a user has associated this warehouse"

These constraints must be in the ad_message table
(0008249)
svnbot (reporter)
2008-07-09 15:23

Repository: openbravo
Revision: 5740
Author: hennadzi
Date: 2008-07-09 15:23:28 +0200 (Wed, 09 Jul 2008)

Fixed bug 0004072: I get an error message trying to delete a Role selected as default by an user

---
U trunk/src-db/database/sourcedata/AD_MESSAGE.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=5740&sc=1 [^]

- Issue History
Date Modified Username Field Change
2008-06-19 12:45 plujan New Issue
2008-06-19 12:45 plujan Assigned To => cromero
2008-06-19 12:45 plujan sf_bug_id 0 => 1997688
2008-06-19 12:45 plujan File Added: r240r3_BUG_DeletingARole.JPG
2008-06-23 18:09 cromero Status new => scheduled
2008-06-23 18:09 cromero Note Added: 0007962
2008-06-23 18:09 cromero Assigned To cromero => Hennadzi
2008-07-09 15:23 svnbot Checkin
2008-07-09 15:23 svnbot Note Added: 0008249
2008-07-09 15:23 svnbot Status scheduled => resolved
2008-07-09 15:23 svnbot Resolution open => fixed
2008-07-09 15:23 svnbot svn_revision => 5740
2008-12-08 18:26 psarobe Regression testing => No
2008-12-08 18:26 psarobe Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker