UserSendNewTicketNotification

Moderator: crythias

Post Reply
steeman
Znuny newbie
Posts: 67
Joined: 22 May 2013, 11:35
Znuny Version: 3.3.2
Real Name: Philip Steeman
Company: VIVES

UserSendNewTicketNotification

Post by steeman »

I use version 4.0.12 (updated from 4.0.8)

When I look at the user prefs for the UserSendNewTicketNotification I can choose between <blank> Yes and No. Blank whas selected which is an odd choise!. When I change this to yes, I don't get any new ticket notifications anymore.

the html code from the browser:

Code: Select all

<select id="UserSendNewTicketNotification" name="UserSendNewTicketNotification">
  <option value="" selected="selected" title=""></option>
  <option value="1"  title="Yes">Yes</option>
  <option value="0" title="No">No</option>
</select>
When I look at the mysql-databank I see that the following has changed (after selecting Yes):

BEFORE THE YES selection

Code: Select all

mysql> select * from user_preferences where user_id=2 and preferences_key="UserSendNewTicketNotification";
+---------+-------------------------------+-------------------+
| user_id | preferences_key               | preferences_value |
+---------+-------------------------------+-------------------+
|       2 | UserSendNewTicketNotification | MyQueues          |
+---------+-------------------------------+-------------------+
1 row in set (0.00 sec)
AFTER THE YES selection

Code: Select all

mysql> select * from user_preferences where user_id=2 and preferences_key="UserSendNewTicketNotification";
+---------+-------------------------------+-------------------+
| user_id | preferences_key               | preferences_value |
+---------+-------------------------------+-------------------+
|       2 | UserSendNewTicketNotification | 1                 |
+---------+-------------------------------+-------------------+
1 row in set (0.00 sec)
This is an odd change. Logically it seems better than before (it has to be 0 or 1), but it doesn't work anymore after the change.


Another thing that has probably something to do with this. I get errors with otrs.PostMastermailbox.pl:

Code: Select all

ERROR: OTRS-otrs.PostMasterMailbox.pl-12 Perl: 5.14.2 OS: linux Time: Tue Oct 13 16:10:03 2015

 Message: Invalid UserSendNewTicketNotification option '1' for user 'u0080681' 

 Traceback (5779): 
   Module: Kernel::System::Ticket::Article::ArticleCreate Line: 544
   Module: Kernel::System::PostMaster::NewTicket::Run Line: 428
   Module: Kernel::System::PostMaster::Run Line: 368
   Module: Kernel::System::MailAccount::POP3::Fetch Line: 216
   Module: Kernel::System::MailAccount::MailAccountFetch Line: 441
   Module: main::Fetch Line: 171
   Module: /opt/otrs//bin/otrs.PostMasterMailbox.pl Line: 85
When I look in this code (Article.pm) I see a reference to UserSendNewTicketNotication and compares it to 'MyQueues'.

Code: Select all

            if ( $UserData{UserSendNewTicketNotification} eq 'MyQueues' ) {
                next USER if !$MyQueuesUserIDs{$UserID};
            }
            elsif ( $UserData{UserSendNewTicketNotification} eq 'MyServices' )
                next USER if !$MyServicesUserIDs{$UserID};
            }
            elsif ( $UserData{UserSendNewTicketNotification} eq 'MyQueuesOrMySe
                next USER if !$MyQueuesUserIDs{$UserID} && !$MyServicesUserIDs{
            }
            elsif ( $UserData{UserSendNewTicketNotification} eq 'MyQueuesAndMyS
                next USER if !$MyQueuesUserIDs{$UserID} || !$MyServicesUserIDs{
            }
            else {
                $Kernel::OM->Get('Kernel::System::Log')->Log(
                    Priority => 'error',
                    Message  => "Invalid UserSendNewTicketNotification option"
                        . " '$UserData{UserSendNewTicketNotification}'"
                        . " for user '$UserData{UserLogin}' ",
                );
                next USER;
            }

Is this a bug or is something seriously wrong with my installation?

Some more info for another preference_key (also MyQueues):

Code: Select all

mysql> select * from user_preferences where user_id=2 and preferences_key="UserSendFollowUpNotification";
+---------+------------------------------+-------------------+
| user_id | preferences_key              | preferences_value |
+---------+------------------------------+-------------------+
|       2 | UserSendFollowUpNotification | MyQueues          |
+---------+------------------------------+-------------------+
1 row in set (0.00 sec)
Philip
Last edited by crythias on 13 Oct 2015, 17:08, edited 1 time in total.
Reason: [code] tags for sanity.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: UserSendNewTicketNotification

Post by reneeb »

The Yes/No selection was in OTRS < 4. As of OTRS 4 you can get notifications based on queues and/or services. So your preferences dialog seems to be "old". Do you have any addons installed? Have a look at the sysconfig settings for this preference option, too.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: UserSendNewTicketNotification

Post by crythias »

How or where (what page?) is the UserSendNewTicketNotification offered? From the code, the only values allowed are MyQueues, My Services, My Queues and My Services, and My Queues or My Services.

Code: Select all

                                <select id="UserSendNewTicketNotification" name="UserSendNewTicketNotification">
  <option value="MyQueues" selected="selected" title="My Queues">My Queues</option>
  <option value="MyQueuesAndMyServices" title="My Queues and My Services">My Queues and My Services</option>
  <option value="MyQueuesOrMyServices" title="My Queues or My Services">My Queues or My Services</option>
  <option value="MyServices" title="My Services">My Services</option>
  <option value="0" title="No Notification">No Notification</option>
</select>
                                <button type="submit" id="UserSendNewTicketNotificationUpdate" value="Update">Update</button>
And this comes from:
https://github.com/OTRS/otrs/blob/rel-4 ... .xml#L7068

or SysConfig
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Preferences</SubGroup>
NewTicketNotify

*** You may need to rebuild config ***
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
steeman
Znuny newbie
Posts: 67
Joined: 22 May 2013, 11:35
Znuny Version: 3.3.2
Real Name: Philip Steeman
Company: VIVES

Re: UserSendNewTicketNotification

Post by steeman »

reneeb wrote:The Yes/No selection was in OTRS < 4. As of OTRS 4 you can get notifications based on queues and/or services. So your preferences dialog seems to be "old". Do you have any addons installed? Have a look at the sysconfig settings for this preference option, too.
my addons
Naam Versie Leverancier Omschrijving Status Actie
Dit pakket is geverifieerd door OTRSverify (tm) FAQ
4.0.2 xxx The FAQ/knowledge base. geïnstalleerd Verwijder
Dit pakket is geverifieerd door OTRSverify (tm) iPhoneHandle
4.0.2 xxx The iPhoneHandle Package. geïnstalleerd Verwijder
Dit pakket is geverifieerd door OTRSverify (tm) Znuny4OTRS-EscalationSuspend
2.1.1 Znuny GmbH A module to enable escalation suspension. geïnstalleerd Verwijder
Dit pakket is geverifieerd door OTRSverify (tm) Znuny4OTRS-ExternalURLJump
1.2.0 Znuny GmbH A feature to link external URLs in the navigation bar. geïnstalleerd Verwijder
Dit pakket is geverifieerd door OTRSverify (tm) Znuny4OTRS-Repo
2.0.14 Znuny GmbH Enables Znuny4OTRS repos to install and upgrade pack... geïnstalleerd Verwijder
steeman
Znuny newbie
Posts: 67
Joined: 22 May 2013, 11:35
Znuny Version: 3.3.2
Real Name: Philip Steeman
Company: VIVES

Re: UserSendNewTicketNotification

Post by steeman »

crythias wrote:How or where (what page?) is the UserSendNewTicketNotification offered? From the code, the only values allowed are MyQueues, My Services, My Queues and My Services, and My Queues or My Services.

Code: Select all

                                <select id="UserSendNewTicketNotification" name="UserSendNewTicketNotification">
  <option value="MyQueues" selected="selected" title="My Queues">My Queues</option>
  <option value="MyQueuesAndMyServices" title="My Queues and My Services">My Queues and My Services</option>
  <option value="MyQueuesOrMyServices" title="My Queues or My Services">My Queues or My Services</option>
  <option value="MyServices" title="My Services">My Services</option>
  <option value="0" title="No Notification">No Notification</option>
</select>
                                <button type="submit" id="UserSendNewTicketNotificationUpdate" value="Update">Update</button>
And this comes from:
https://github.com/OTRS/otrs/blob/rel-4 ... .xml#L7068

or SysConfig
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Preferences</SubGroup>
NewTicketNotify

*** You may need to rebuild config ***
In my preferences
https://servicedesk.khbo.be/otrs/index. ... references

or in the agent prefs
https://servicedesk.khbo.be/otrs/index. ... 55;Search=
steeman
Znuny newbie
Posts: 67
Joined: 22 May 2013, 11:35
Znuny Version: 3.3.2
Real Name: Philip Steeman
Company: VIVES

[Solved] UserSendNewTicketNotification

Post by steeman »

via SysConfig
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Preferences</SubGroup>
NewTicketNotify

I did there a reset and an update

Rebuild Config

Resaved the preference of every agent

--> solved

The problem must been started months ago with the upgrade from version 3 to version 4. It was activated when someone changed his preferences.

Thanks for the advice

Philip
Post Reply