Issue Details (XML | Word | Printable)

Key: JRA-11890
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Jeff Turner [Atlassian]
Reporter: Jeff Turner [Atlassian]
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JIRA

Deleting user or group from Role breaks on Sybase (and other column-case-sensitive databases)

Created: 07/Jan/07 07:16 PM   Updated: 04/Mar/07 06:21 PM
Component/s: Roles
Affects Version/s: 3.7, 3.7.1
Fix Version/s: 3.7.2

Time Tracking:
Not Specified

File Attachments: 1. Text File jra11890fix.diff (1 kB)
2. Java Archive File jra11890fix.jar (7 kB)


Participants: Jeff Turner [Atlassian]
Since last comment: 1 year, 34 weeks, 6 days ago
Resolution Date: 07/Jan/07 07:37 PM
Labels:


 Description  « Hide
Deleting a group or role breaks with the following exception in Sybase:
com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:DELETE FROM projectroleactor WHERE id IN (?)  (Invalid column name 'id'.
)
at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.removeByOr(DefaultOfBizDelegator.java:210)
at com.atlassian.jira.security.roles.OfBizProjectRoleAndActorStore.updateRoleActors(OfBizProjectRoleAndActorStore.java:413)
at com.atlassian.jira.security.roles.OfBizProjectRoleAndActorStore.updateDefaultRoleActors(OfBizProjectRoleAndActorStore.java:183)
at com.atlassian.jira.security.roles.CachingProjectRoleAndActorStore.updateDefaultRoleActors(CachingProjectRoleAndActorStore.java:169)
at com.atlassian.jira.security.roles.DefaultProjectRoleManager.updateDefaultRoleActors(DefaultProjectRoleManager.java:161)
at com.atlassian.jira.bc.projectroles.DefaultProjectRoleService.updateActorsToDefaultRole(DefaultProjectRoleService.java:854)
at com.atlassian.jira.bc.projectroles.DefaultProjectRoleService.removeDefaultActorsFromProjectRole(DefaultProjectRoleService.java:453)
at com.atlassian.jira.web.action.admin.roles.GroupRoleActorAction.doUpdate(GroupRoleActorAction.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
....


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jeff Turner [Atlassian] added a comment - 07/Jan/07 07:36 PM
This occurs because in 3.7 we introduced OfbizDelegator.removeByOr(), and we hardcode "id" (lowercase) rather than looking up the correct column case from the EntityModel.

Attached is a fix for 3.7 and 3.7.1. To apply, go to the command-line, cd to atlassian-jira/WEB-INF/classes (JIRA Standalone) or edit-webapp/WEB-INF/classes (Webapp edition) and run 'jar xvf /path/to/jra11890fix.jar'. This will extract one replacement class into the correct place. Then restart or rebuild JIRA.