Services/OTRS

From popdata
Jump to: navigation, search

Back to Services

  • OTRS Trouble Ticket system version 3.1 runs on cartier2 == otrs.popdata.bc.ca
  • Config: //opt/otrs/Kernel/
  • Logs: in database via web admin
  • Misc: /opt/otrs/var

Use of OTRS

Manual - no

There is an Administrators Manual at http://doc.otrs.org/3.1/en/html/

Create a new ticket: Email

  • Open a new OTRS tab: Right-Click on "Admin" -> open in new tab (other windows are slow to open).
  • Menu "New Email Ticket" will send what you compose to the named email address.
  • Menu "New Phone ticket" will send a meaningless automated response to customer "a human will look at this". Don't do it!
  • Sending an email to sre, transfer, rtl, srtl, upload, support, and support@chspr.ubc.ca will create a ticket in the appropriate queue (support -> general queue). Note that the first 2 are Zimbra distribution lists, the last 5 aliases. The original messages are kept in Zimbra under account otrs .

Find sender and recipient of email

The OTRS ticket window hides email addresses. You can get a temporary view of the sender by hovering over that column.

  • Forward the ticket will show you email addresses.
  • Miscellaneous -> History. Lots of info, but not who the original was emailed From or CC'd
  • Message Log can reveal list of email addresses and times for current item:
    1. Click (or right-click) on "Message Log"; Select priority "Debug" instead of "Trace", then
    2. type @ into 'Filter for log entries"
    If you change priority (ex: from "Trace" to "Debug") you may need to re-select "Message" in overview window at top.

Split a ticket

If a customer places multiple tasks in a single ticket, and you think that splitting it into multiple tickets would make it easier to keep track of task progress / completion:

  • Select the message within a ticket that contains the extra request
  • Actually I think the following works better:
    1. Create a new ticket and prepare to paste in the following
    2. Forward the message, and copy the new part, paste it into the "new" window, then discard the "forward" window
    3. Link the old ticket # to the new
  • The "split" function creates a "phone ticket", which sends a confusing totally generic "a human will respond" message.
    • Click "split" and a new "phone ticket" will be created, pre-filled with:
      • the original subject, which you should probably change
      • a copy of the selected message, which you should edit to emphasize the task for this split-off ticket
      • the original ticket is unchanged, except for a Child Object# under "Linked Objects" discreetly in the L.R. corner.
        • Please add to the original ticket a note about the splitting.
      • user receives generic "Thanks for your email. A new ticket has been created". Important to reply soon to the customer based on the new split-off ticket.
  • See sample "test splitting tickets" at https://otrs.popdata.bc.ca/index.pl?Action=AgentTicketZoom;TicketID=2735

Merge some tickets

Sometimes multiple emails trigger multiple tickets, but they really all belong in one ticket.

  • For example a blocked output may have the original yellowfolder notice of blocking, correspndence from the researcher, and manual transfer.
    In Queue or search view, select (checkbox) the tickets and click "Bulk", then "merge to oldest". Alternately you can pick another ticket number to be the winner.
  • An alternative way is: open a ticket that you want to merge into another, and under "Miscellaneous" pick "merge", and enter the main ticket number to merge into.

Denis Otrs Queue by last Changed

  • The following URL will open OTRS and sort not by date when ticket was created, but time of last change.
  • For example if a user replies to a year-old ticket, the normal sort will leave the ticket far down the list, but this sort will bring it to the top.
  • You may need to click the gear icon in the U-R corner to make column "Changed" visible.
  • I save this URL as a bookmark I call "OQC" (Otrs Queue by last Change), whcih I can then type into the address bar and select.

https://otrs.popdata.bc.ca/index.pl?Action=AgentTicketQueue;QueueID=0;SortBy=Changed;OrderBy=Down;View=Small;Filter=All

Unclose a ticket

A closed ticket will reopen when it receives an email reply. Alternately,

Administration - add/modify user

  • Tab "ADMIN" => Agents => [+ Add agent]
    • type garbage in password field: field required, but authentication is read-only to PD LDAP,
    • in tab ADMIN => Agents<->Group ; select user ; select permissions
  • associate agents to queues - I think group SRE support has access to queue SRE, and group "users" has access (via agent menu) to all other queues.
  • use phpldapadmin as admin to add to group "otrs"

OTRS configuration files

  • email address for notifications to agents should be set in /opt/otrs/Kernel/Config.pm (see also Kernel/Config/Defaults.pm)
    • $Self->{NotificationSenderName} = 'OTRS Notification Master';
    • $Self->{NotificationSenderEmail} = 'otrs@popdata.bc.ca';

Changing format of tickets

  • Ticket::SubjectFormat - position on subject line of "[Ticket#201212311012345]" default:'Left' try:'Right'
  • Ticket::Hook - default: "Ticket#" try: "pd#"
  • Ticket::NumberGenerator - name of module generating and recognizing ticket numbers. Current: "....DateChecksum" . Supplies functions "CreateTicketNr()" and "GetTNByString()" Set in Kernel/Config/Files/Ticket.xml
  • SystemID - short string to differentiate between multiple sites. default: "10" try "0" or "-"
  • Ticket::MinCounterSize - default 5, try 3. Not sure whether counter is count of tickets in day, or some checksum or ...

I would like to change:

  • subject: SRE new (real subject trunca...) [pd#20121130-123]
  • subject: RTL followup (real subject trunca...) [pd#20121130-123]
  • Replace "Hi Denis, you've got a ..." with "RTL followup..."

Email Stuck for New Tickets

  • Mail gets fetched via IMAP connection to Zimbra, see OTRS Mail Account Management
    • Runs every minute (or maybe 5?). OTRS deletes each message from INBOX after processing; Zimbra account is configured to save a copy in folder Archive.
    • Probably run by /opt/otrs//bin/otrs.Daemon.pl (restarts at 00:20 ?)
      • daemon (PPID=1) process forks sub-porcesses which seem to hang around (currently 4)
        • The configuration items in /opt/otrs/var/cron/* get assembled into /var/spool/cron/crontabs/otrs
        # Who gets the cron emails? ; MAILTO="root@localhost
        */5 * * * * $HOME/bin/otrs.Daemon.pl start >> /dev/null
    • Look for error logs in /opt/otrs/var/log/Daemon/ (all empty)
    • Error message in /var/mail/root
      Subject: OTRS Scheduler Daemon Cron: MailAccountFetch
      Date: Sat, 23 Mar 2019 02:03:28 -0700
      Subject: OTRS Scheduler Daemon Cron: MailAccountFetch
      Message: IMAPS: Auth for user otrs/mail.popdata.bc.ca failed!
    • Recurred Mar 18; Mar 19, 16:57, 16:58 ... 17:11)

If new tickets fail to appear, or zimbra mailbox "OTRS" accumulates tickets in INBOX, check for errors in OTRS tab Admin=>System Log.

2014-02-26 Denis removed otrs.SetPermissions.pl from root crontab on Cartier2

# OTRS daily fix permissions [occasionally makes it worse]
# 20 0 * * * cd /opt/otrs && bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=www-data --otrs-group=www-data --web-group=www-data /opt/otrs
  • Examining /var/mail/root to debug /opt/otrs/bin/otrs.SetPermissions.pl
    • when the script meets an error (disappearing temporary file) it aborts in the middle, and leaves scripts unexecutable.
    • it appears that the code does more recursing of sub-directories than intended, thus remove "x" permissions and later re-adding them. The bug is probably the use of "no_chdir => 1" in ** File::Find::find, when the intention was probably not recurse, which requires inserting code in the "wanted" function (MakeWritable) to prune subdirectories from the search.
  • otrs.SetPermissions.pl does the following:
    1. Set permissions for ALL under /opt/otrs to mode=664 (dir=775); if running as root, chown to AdminUserID:AdminGroupID. If "secure" option, leave out group write.
    2. create $DestDir/var/log/TicketCounter.log
    3. create var subdirs; make them recursively writeable + setgid
    4. make bin/* executable
    5. make selected scripts/* executable
    6. unless "secure" option, make writeable config.pm