Notifications are truncated at 4000 chars in database

Description

When a notification is larger than 4000 chars, it's inserted in the database (table "notifications", column "textmsg") truncated to 4000 chars.

If a notification is HTML-based, when presented in the WebApp, the layout of the list of notifications is going to be bogus.

In my installation of version 1.8.17, I've patch:

  • "OnmsNotifcation.java" to remove the "@Column(size=4000)" annotation to method "getTextMsg()

  • NotificationManager.java to remove the hardcoded limitation to 4000 chars in method "insertNotice(..)"

After some tests, the problem was resolved.

Thanks to Alejandro Galue, who pinpointed the exact location of the problem. He's email is attached, to document the issue.

Environment

CentOS 5.6, RHEL 5.4, java 1.6

Acceptance / Success Criteria

None

Attachments

1
  • 20 May 2014, 04:20 AM

Lucidchart Diagrams

Activity

Show:

Alejandro Galue May 20, 2014 at 11:31 AM

Fixed on revision fa9e0fab900fab36987ebb8525f2c68fc322e678 for 1.12 and merged into master on revision 2bacc95df15be80bd8bb039f8463777ae2832007

Fixed

Details

Assignee

Reporter

Original estimate

Time tracking

No time logged1h remaining

Fix versions

Affects versions

Priority

PagerDuty

Created May 20, 2014 at 4:20 AM
Updated January 27, 2017 at 4:21 PM
Resolved May 20, 2014 at 11:31 AM

Flag notifications