Error modifying notification mail body

Moderator: crythias

Locked
StefanoBoccanera
Znuny newbie
Posts: 76
Joined: 23 Feb 2011, 15:43
Znuny Version: 3.1.5
Real Name: Stefano Boccanera
Company: I.Conseils (self-employee)
Location: Rome (Italy)

Error modifying notification mail body

Post by StefanoBoccanera »

Hi

I'm trying to modify the body of email messages related to some agent notifications email, using sysconfig function.
After selected the right notification message, filtered by language (Italian), I changed the text email message, basically translating in italian the text and adding some other Otrs tag.

When I confirmed the changes, all seems works fine but in log files I catch following error.

Tue Apr 12 14:34:02 2011 error OTRS-CGI-10 ERROR: duplicate key value violates unique constraint "notifications_pkey"

come back to the previous email form, all is back to previuosly content. I'm wondering if the email text is changeable and if I can change the language of text or not.

I didn't found any topic about it .....

best regards

stefano
Stefano Boccanera

OTRS : 3.1.5
ITSM : 3.1
S.O : RH
RDBMS : Postgres
StefanoBoccanera
Znuny newbie
Posts: 76
Joined: 23 Feb 2011, 15:43
Znuny Version: 3.1.5
Real Name: Stefano Boccanera
Company: I.Conseils (self-employee)
Location: Rome (Italy)

Re: Error modifying notification mail body

Post by StefanoBoccanera »

SOLVED

The problem arises from a misalignment between the sequence table notification_id_seq value and the notification id's into the DB.
The sequence value was lower than maximmu notification id on the db (i don't know how was happened, I didn't insert new notification ...).

I solved the problem with a workaround, setting the value at maximu id's + 1 and now all works.

For my opinion the module notifications.pm would change the current 'modification' alghoritm than do a delete/insert sequence for the modified notification, probably a modification for modified column or for all column (despite if modified or not) would avoid any problem also in caso of misalignment.

stefano
Stefano Boccanera

OTRS : 3.1.5
ITSM : 3.1
S.O : RH
RDBMS : Postgres
Locked