New and Improved 3.13 Beta. Highlights: Shareable filters and dashboards and lots of other goodies. Any feedback can be raised as JIRA issues in the JIRA project.
Issue Details (XML | Word | Printable)

Key: JRA-13329
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Ian Daniel [Atlassian]
Votes: 0
Watchers: 0
Operations

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

Error when adding a group with name longer than 60 characters to a notification scheme: too long for database column

Created: 15/Aug/07 12:04 AM   Updated: 01/Jul/08 08:58 PM
Component/s: Backend / Domain Model
Affects Version/s: None
Fix Version/s: 3.13.x

Time Tracking:
Not Specified

Environment:
Customer: JIRA Enterprise 3.6.5 using PostgreSQL.
Me: JIRA Standalone Enterprise 3.10.1 using MySQL
Issue Links:
Reference
 

Participants: Anton Mazkovoi [Atlassian], Ian Daniel [Atlassian] and Jed Wesley-Smith [Atlassian]
Since last comment: 38 weeks ago
Labels: group_names


 Description  « Hide
Create a group with a name longer than 60 characters. Then try to add it to a notification scheme. You get the following error (on the screen as well as in the logs):
org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:INSERT INTO notification (ID, SCHEME, 
EVENT, EVENT_TYPE_ID, TEMPLATE_ID, notif_type, notif_parameter) VALUES (?, ?, ?, ?, ?, ?, ?) (Data truncation: Data too long for 
column 'notif_parameter' at row 1)
        at org.ofbiz.core.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:375)

The problem is that the notif_parameter column of the notification table is a varchar(60), and the groupname is stored directly in this field.
The groupname field of the groupbase table is varchar(255).

This bug is compounded by the fact that you can't simply change a group name (to reduce it to less than 60 characters).

A support customer has this issue in 3.6.5 Enterprise running on Postgres. I have reproduced it in 3.10.1 Enterprise running MySQL.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Anton Mazkovoi [Atlassian] added a comment - 15/Aug/07 11:28 PM
The width of the column should really be 255 for the notification parameter, as we store group names, role names, custom field names, and they are all long-varchars (i.e. 255 chars).

Need to check what else we store in the parameter column. That is, check trhough all notifications types (notification-event-types.xml)

If we change the width of the column, it might not work as I am not sure if OfBiz handles this case. So we will need to do what we did in 3.7:

  1. Post SQL for each database
  2. Advise people to upgrade using safe procedure (i.e. XML backup and restore)

Cheers,
Anton


Jed Wesley-Smith [Atlassian] added a comment - 06/Dec/07 08:00 PM
The fix for this issue has not been able to make it into JIRA v3.12. We are hoping to incorporate it into v3.12.1. As of writing however, there are 163 items scheduled as Fix For v3.12.1. We will not be able to include all of them.