{"id":902,"date":"2019-10-31T11:25:37","date_gmt":"2019-10-31T11:25:37","guid":{"rendered":"https:\/\/blog.lboro.ac.uk\/middleware\/?p=902"},"modified":"2019-10-31T11:31:15","modified_gmt":"2019-10-31T11:31:15","slug":"the-fast-and-the-furious-one-click-quick-tickets-for-rt","status":"publish","type":"post","link":"https:\/\/blog.lboro.ac.uk\/middleware\/blog\/rt\/the-fast-and-the-furious-one-click-quick-tickets-for-rt","title":{"rendered":"The Fast and the Furious: One click quick tickets for RT"},"content":{"rendered":"\n<p>\nJon and I have blogged before about some of\nthe ways we\u2019ve extended Best Practical\u2019s Request Tracker (RT) to\nadd functionality, but we\u2019ve not really talked about how we enhance\nwhat\u2019s already there. In this case we wanted to have a way to\nhandle high volume, repeat tickets. We\u2019re not that interested in\nwho has the problem, more how many times it\u2019s coming up, where it\u2019s\nbeing seen and when.<\/p>\n\n\n\n<p> <strong>Freshers week<\/strong><\/p>\n\n\n\n<p>\nThe annual Freshers Week (which tends to\nlast somewhat longer than a week) sees about 5,000 new students\narrive and some 10,000 returners. This leads to a spike in work\nrequests, mainly (but not exclusively) around getting devices\nconnected to our wireless network. In this case, we are pretty sure\nwe know what requests are going to arrive, but we want to be sure we\nare adequately setup to cope with the busiest periods. In order to\nmeasure demand, we need a system that is as quick as recording a pen\nstroke for a 5-bar gate. Alongside this we run kiosks for the\nstudents around the campus, these can be anything from a dedicated\ndesk, to a throw-up tent. A secondary requirement was to find out\nwhich of these kiosks, were the most popular and have them correctly\nstaffed to meet demand.<\/p>\n\n\n\n<p> To this end a quick ticket system was developed, from the systems already implemented within RT, which recorded a minimum amount of data in the shortest time possible.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-22-at-14.07.23.png\" alt=\"\" class=\"wp-image-903\" width=\"580\" height=\"161\" srcset=\"https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-22-at-14.07.23.png 929w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-22-at-14.07.23-300x84.png 300w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-22-at-14.07.23-768x214.png 768w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-22-at-14.07.23-500x139.png 500w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><figcaption>Fig 1: Freshers Week Quick Ticket Portlet<\/figcaption><\/figure>\n\n\n\n<p> There are two parts to the ticket portlet. The first is capturing the kiosk number. As a stint at a kiosk was normally a few hours, we wanted to have our staff set their location once and have the portlet remember it for the duration of the session. This is achieved by a simple numerical dropdown html form field (as an RT Custom Field) and the use of browser localStorage, via javascript.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;script>\n    jQuery(document).ready(function(){\n        jQuery('#kioskNumber').change(saveSettings);\n        loadSettings();\n    });\n    function loadSettings() {\n        jQuery('#kioskNumber').val(localStorage.Kiosk);\n        jQuery('input[name=\"Object-RT::Ticket--CustomField:Kiosk-2-Value\"]').val(jQuery('#kioskNumber').val());\n    }\n    function saveSettings() {\n        localStorage.Kiosk = jQuery('#kioskNumber').val();\n        jQuery('input[name=\"Object-RT::Ticket--CustomField:Kiosk-2-Value\"]').val(jQuery('#kioskNumber').val());\n    }\n&lt;\/script><\/code><\/pre>\n\n\n\n<p>\nThe above javascript stores the kiosk\nchoice in the browsers storage and recalls it every time the page is\nreloaded.<\/p>\n\n\n\n<p>\nOnce we had a method of recording the kiosk\nnumber, we then needed a set of buttons to record the issues. These\nbuttons and the kiosk dropdown, feed into the form to create the\nticket.<\/p>\n\n\n\n<p> The ticket data is formed of a prescribed subject, a status of resolved, who created the ticket and when it was done.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>% my $prefix = '[Freshers Week] ';\n% my @subjects = (\u2018My\u2019, \u2018array\u2019, \u2018of\u2019, \u2018subjects\u2019);\n% foreach my $thisSubject (@subjects) {\n&lt;form\n    method=\"post\"\n    action=\"&lt;%RT->Config->Get('WebPath')%>&lt;% $r->path_info %>\"\n% $m->callback(CallbackName => 'InFormElement');\n>\n&lt;input type=\"hidden\" class=\"hidden\" name=\"QuickCreate\" value=\"1\" \/>\n&lt;input type=\"hidden\" class=\"hidden\" name=\"Queue\" value=\"3\" \/>\n&lt;input type=\"hidden\" class=\"hidden\" name=\"Subject\" value=\"&lt;%$prefix%>&lt;%$thisSubject%>\"\/>\n&lt;input type=\"hidden\" class=\"hidden\" name=\"Owner\" value=\"&lt;%$session{'CurrentUser'}->id%>\" \/>\n&lt;input type=\"hidden\" class=\"hidden\" name=\"Requestors\" value=\"&lt;%$session{'CurrentUser'}->EmailAddress%>\" \/>\n&lt;input type=\"hidden\" class=\"hidden\" name=\"Object-RT::Ticket--CustomField:Kiosk-2-Value-Magic\" value=\"1\" \/>\n&lt;input type=\"hidden\" name=\"Object-RT::Ticket--CustomField:Kiosk-2-Value\" id=\"Object-RT::Ticket--CustomField:Kiosk-2-Value\" class=\"CF-2-Edit\" value=\"1\" \/>\n&lt;input type=\"hidden\" class=\"hidden\" name=\"Status\" value=\"resolved\" \/>\n&lt;&amp; \/Elements\/Submit, Label => loc(\"$thisSubject\") &amp;>\n&lt;\/form><\/code><\/pre>\n\n\n\n<p> The above code will create a ticket in queue 3, via the QuickCreate method, as used by RT\u2019s default quick ticket creator. Using this method, we are able to create tickets at the push of a button, the QuickCreate method does not take you to a new page, instead it simply acknowledges the creation of the ticket and refreshes the page the portlet is on, as seen below:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"179\" src=\"https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.01.50-1024x179.png\" alt=\"\" class=\"wp-image-904\" srcset=\"https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.01.50-1024x179.png 1024w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.01.50-300x53.png 300w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.01.50-768x135.png 768w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.01.50-500x88.png 500w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.01.50.png 1478w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Fig 2: A ticket has been created and resolved. The interface acknowledges the ticket and the portlet is ready for the next case<\/figcaption><\/figure>\n\n\n\n<p> We can now take the data that is created and report back on the busy periods at any of the kiosks (see figures 3 and 4), to allow us to plan ahead for the next academic year, in terms of how we staff our kiosks and where we place them.  <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"643\" height=\"414\" src=\"https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.06.42.png\" alt=\"\" class=\"wp-image-905\" srcset=\"https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.06.42.png 643w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.06.42-300x193.png 300w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.06.42-466x300.png 466w\" sizes=\"auto, (max-width: 643px) 100vw, 643px\" \/><figcaption>Fig 3: Mapping of the hourly demand at kiosk1, across the entirety of Freshers Week<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"645\" height=\"413\" src=\"https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.09.55.png\" alt=\"\" class=\"wp-image-907\" srcset=\"https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.09.55.png 645w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.09.55-300x192.png 300w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.09.55-469x300.png 469w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><figcaption>Fig 4: The same search at kiosk2, showing a different demand pattern<\/figcaption><\/figure>\n\n\n\n<p> Further we can use the same data these tickets are generating to see what the major requests are (via the prescribed subject line) and if necessary have more specialised staff on hand (or target training for our current staff) in future years, to help manage the demand. In order to achieve this a slight modification to the dropdown list on RT\u2019s chart form is needed, to add the option for \u201cSubject\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"644\" height=\"710\" src=\"https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.25.15.png\" alt=\"\" class=\"wp-image-908\" srcset=\"https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.25.15.png 644w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-28-at-11.25.15-272x300.png 272w\" sizes=\"auto, (max-width: 644px) 100vw, 644px\" \/><figcaption>Fig 5: Demand by subject at a kiosk, throughout Freshers Week<\/figcaption><\/figure>\n\n\n\n<p> <strong>Day to Day on the PC Clinic<\/strong><\/p>\n\n\n\n<p>\nThese quick tickets proved so popular and\nuseful we were asked to extend them, to deal with regular requests\noutside of Freshers Week, during normal term time. As with the\nFreshers Week tickets, the requirement for single click 5 bar gate\nstyle recording was kept. In the case of the term time tickets its\nwas requested that we have a method for recording who has the issue. \n<\/p>\n\n\n\n<p> In this case we modified another piece of existing RT code to create a new portlet, that has many of the similarities of the Freshers Week array, but also includes a user lookup (the thinking here is to try and find people who may be having recurring problems)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;table>\n  &lt;tbody>\n    &lt;tr class=\"input-row\">\n    &lt;td class=\"label\">&lt;&amp;|\/l&amp;>Requestors&lt;\/&amp;>:&lt;\/td>\n    &lt;td colspan=\"3\" class=\"value\">&lt;&amp; \/Elements\/EmailInput, Name => 'Requestors', id => 'Requestors', Size => '40', Default => $args->{Requestors} || $session{CurrentUser}->EmailAddress, AutocompleteMultiple => 1 &amp;>&lt;\/td>\n    &lt;\/tr>\n  &lt;\/tbody>\n&lt;\/table><\/code><\/pre>\n\n\n\n<p> This addition along with a few minor teaks to the form code, to allow a different list of issues and to detect the requestor, allows us to continue using these quick tickets on our permanent PC Clinic, throughout the year.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"957\" height=\"224\" src=\"https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-22-at-14.06.05.png\" alt=\"\" class=\"wp-image-909\" srcset=\"https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-22-at-14.06.05.png 957w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-22-at-14.06.05-300x70.png 300w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-22-at-14.06.05-768x180.png 768w, https:\/\/blog.lboro.ac.uk\/middleware\/wp-content\/uploads\/sites\/2\/2019\/10\/Screenshot-2019-10-22-at-14.06.05-500x117.png 500w\" sizes=\"auto, (max-width: 957px) 100vw, 957px\" \/><figcaption>Fig 6: The portlet for day to day Quick Tickets<\/figcaption><\/figure>\n\n\n\n<p> This method of recording tickets has proven itself to be able to handle large amounts of cases at the busiest times of the year and is  providing our management with useful data, to enable future planning to make sure we provide our staff and students with an excellent user experience. It would appear that the RT service owner is certainly happy with them, based on the amount of chocolate biscuits we\u2019re receiving.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jon and I have blogged before about some of the ways we\u2019ve extended Best Practical\u2019s Request Tracker (RT) to add functionality, but we\u2019ve not really talked about how we enhance what\u2019s already there. In this case we wanted to have &hellip; <a href=\"https:\/\/blog.lboro.ac.uk\/middleware\/blog\/rt\/the-fast-and-the-furious-one-click-quick-tickets-for-rt\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[70],"tags":[],"class_list":["post-902","post","type-post","status-publish","format-standard","hentry","category-rt"],"_links":{"self":[{"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/posts\/902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/comments?post=902"}],"version-history":[{"count":5,"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/posts\/902\/revisions"}],"predecessor-version":[{"id":915,"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/posts\/902\/revisions\/915"}],"wp:attachment":[{"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/media?parent=902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/categories?post=902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lboro.ac.uk\/middleware\/wp-json\/wp\/v2\/tags?post=902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}