{"action":"created","issue":{"url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/1419","labels_url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/1419/labels{/name}","comments_url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/1419/comments","events_url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/1419/events","html_url":"https://github.com/osTicket/osTicket-1.8/pull/1419","id":46488895,"number":1419,"title":"Tickets: Time tracking","user":{"login":"robintoy","id":8893903,"avatar_url":"https://avatars.githubusercontent.com/u/8893903?v=3","gravatar_id":"","url":"https://api.github.com/users/robintoy","html_url":"https://github.com/robintoy","followers_url":"https://api.github.com/users/robintoy/followers","following_url":"https://api.github.com/users/robintoy/following{/other_user}","gists_url":"https://api.github.com/users/robintoy/gists{/gist_id}","starred_url":"https://api.github.com/users/robintoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robintoy/subscriptions","organizations_url":"https://api.github.com/users/robintoy/orgs","repos_url":"https://api.github.com/users/robintoy/repos","events_url":"https://api.github.com/users/robintoy/events{/privacy}","received_events_url":"https://api.github.com/users/robintoy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":128,"created_at":"2014-10-22T09:21:37Z","updated_at":"2015-07-27T17:09:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/1419","html_url":"https://github.com/osTicket/osTicket-1.8/pull/1419","diff_url":"https://github.com/osTicket/osTicket-1.8/pull/1419.diff","patch_url":"https://github.com/osTicket/osTicket-1.8/pull/1419.patch"},"body":"# Time Tracking Mod / Change\r\n**Updated: 28/06/2015**\r\n\r\nRe-written and complete Time Tracking enhancement.\r\n**Requires Version v1.9.9**\r\n\r\nThis enhancement allows you to enable functions for adding just time to a ticket or enable functions to allow adding time to the thread of the ticket along with the type of time spent.\r\n\r\nThe time types are a custom list that can be modified to your business requirements giving your full billing and reporting abilities.\r\n\r\n\r\n### Pictures\r\nAdmin screen displaying available options\r\n![adminoptions](https://cloud.githubusercontent.com/assets/8893903/8396187/76da6660-1d93-11e5-918e-5c53ea81faf9.jpg)\r\n\r\nTicket Header providing a time overview\r\n![ticket-header](https://cloud.githubusercontent.com/assets/8893903/4733792/8b1905ae-59cc-11e4-842f-3fde56b86b3b.jpg)\r\n\r\nTicket Thread with time added\r\n![ticket-thread](https://cloud.githubusercontent.com/assets/8893903/4733799/99ad8d24-59cc-11e4-91a8-12795b3f0006.jpg)\r\n\r\n\r\nPost a Reply and Internal Note options when you enable thread time\r\n![postreply](https://cloud.githubusercontent.com/assets/8893903/8396229/69dc54f8-1d95-11e5-9c25-bf9b7b3d8392.jpg)\r\n![postinternal](https://cloud.githubusercontent.com/assets/8893903/8396231/707e0f04-1d95-11e5-9ce7-9d556b2d186f.jpg)\r\n\r\n\r\nTime adding form when you enable Total Time adding\r\n![ticket-time](https://cloud.githubusercontent.com/assets/8893903/4733810/b5c0af64-59cc-11e4-92a3-04dcfc516d08.jpg)\r\n\r\n\r\nTime Billing Report / Menu\r\n![billmenu](https://cloud.githubusercontent.com/assets/8893903/8396235/85b4a5c2-1d95-11e5-9f15-e53e41a9891d.jpg)\r\n![billreport](https://cloud.githubusercontent.com/assets/8893903/8396236/8c21b80a-1d95-11e5-8f0f-ded30c3f5f42.jpg)\r\n\r\n\r\n\r\n## MOD Install Instructions\r\n### Base file install\r\n1. Download the following files: -\r\n\r\nhttps://raw.githubusercontent.com/StrobeTechnologiesLtd/osTicket-1.8/TimeTracking/include/class.config.php\r\nhttps://raw.githubusercontent.com/StrobeTechnologiesLtd/osTicket-1.8/TimeTracking/include/class.list.php\r\nhttps://raw.githubusercontent.com/StrobeTechnologiesLtd/osTicket-1.8/TimeTracking/include/class.nav.php\r\nhttps://raw.githubusercontent.com/StrobeTechnologiesLtd/osTicket-1.8/TimeTracking/include/class.thread.php\r\nhttps://raw.githubusercontent.com/StrobeTechnologiesLtd/osTicket-1.8/TimeTracking/include/class.ticket.php\r\nhttps://raw.githubusercontent.com/StrobeTechnologiesLtd/osTicket-1.8/TimeTracking/include/client/view.inc.php\r\nhttps://raw.githubusercontent.com/StrobeTechnologiesLtd/osTicket-1.8/TimeTracking/include/staff/settings-tickettime.inc.php\r\nhttps://raw.githubusercontent.com/StrobeTechnologiesLtd/osTicket-1.8/TimeTracking/include/staff/ticket-view.inc.php\r\nhttps://raw.githubusercontent.com/StrobeTechnologiesLtd/osTicket-1.8/TimeTracking/scp/settings.php\r\nhttps://raw.githubusercontent.com/StrobeTechnologiesLtd/osTicket-1.8/TimeTracking/scp/tickets.php\r\nhttps://raw.githubusercontent.com/StrobeTechnologiesLtd/osTicket-1.8/TimeTracking/scp/tickets_cost.php\r\n\r\n2. Copy class.config.php to /include/\r\n3. Copy class.list.php to /include/\r\n4. Copy class.nav.php to /include/\r\n5. Copy class.thread.php to /include/\r\n6. Copy class.ticket.php to /include/\r\n7. Copy view.inc.php to /include/client/\r\n8. Copy settings-tickettime.inc.php to /include/staff/\r\n9. Copy ticket-view.inc.php to /include/staff/\r\n10. Copy settings.php to /scp/\r\n11. Copy tickets.php to /scp/\r\n12. Copy tickets_cost.php to /scp/\r\n\r\n\r\n### Database upgrade (SQL commends)\r\nRun the following commands in something like PHPMyAdmin or MySQL CLI\r\n```SQL\r\nINSERT INTO  ost_list  ( name ,  name_plural ,  sort_mode ,  masks ,  type ,  notes ,  created ,  updated ) VALUES ('Time Type', 'Time Types', 'SortCol', '13', 'time-type', 'Time Spent plugin list, do not modify', NOW(), NOW());\r\n```\r\n```SQL\r\nINSERT INTO `ost_list_items` (`list_id`, `status`, `value`, `sort`)\r\nSELECT ost_list.id, 1, 'Telephone', 1\r\nFROM ost_list\r\nWHERE `name`='Time Type';\r\n\r\nINSERT INTO `ost_list_items` (`list_id`, `status`, `value`, `sort`)\r\nSELECT ost_list.id, 1, 'Email', 2\r\nFROM ost_list\r\nWHERE `name`='Time Type';\r\n\r\nINSERT INTO `ost_list_items` (`list_id`, `status`, `value`, `sort`)\r\nSELECT ost_list.id, 1, 'Remote', 3\r\nFROM ost_list\r\nWHERE `name`='Time Type';\r\n\r\nINSERT INTO `ost_list_items` (`list_id`, `status`, `value`, `sort`)\r\nSELECT ost_list.id, 1, 'Workshop', 4\r\nFROM ost_list\r\nWHERE `name`='Time Type';\r\n\r\nINSERT INTO `ost_list_items` (`list_id`, `status`, `value`, `sort`)\r\nSELECT ost_list.id, 1, 'Onsite', 5\r\nFROM ost_list\r\nWHERE `name`='Time Type';\r\n\r\n\r\nOLD CODE - Left for reference\r\nSELECT id FROM `ost_list` WHERE `name`='Time Type';~~\r\n\r\nINSERT INTO `ost_list_items` (`list_id`, `status`, `value`, `sort`) VALUES\r\n    (1, 1, 'Telephone', 1),\r\n    (1, 1, 'Email', 2),\r\n    (1, 1, 'Remote', 3),\r\n    (1, 1, 'Workshop', 4),\r\n    (1, 1, 'Onsite', 5);\r\nEND OF OLD CODE\r\n```\r\n```SQL\r\nINSERT INTO  ost_config  (`namespace`, `key`, `value`, `updated`) VALUES\r\n ('core', 'isclienttime', 0, now()),\r\n ('core', 'istickettime', 0, now()),\r\n ('core', 'isthreadtime', 0, now()),\r\n ('core', 'isthreadtimer', 0, now());\r\n```\r\n```SQL\r\nALTER TABLE  ost_ticket  ADD COLUMN  time_spent  INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' AFTER  closed;\r\n```\r\n```SQL\r\nALTER TABLE  ost_ticket_thread  ADD COLUMN  time_spent  INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' AFTER  thread_type;\r\n```\r\n```SQL\r\nALTER TABLE  ost_ticket_thread  ADD COLUMN  time_type  INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' AFTER  time_spent;\r\n```\r\n\r\n\r\n\r\n## News\r\n### 13/03/2015\r\nCode modified to change hours to minutes for storage as suggested by @joshbmarshall \r\n\r\n### 14/03/2015\r\nUpdated all code to support new features added in version v1.9.6\r\n\r\n### 16/03/2015\r\nAdded Thread Timer as suggested by @joshbmarshall but modified to use buttons to start and stop the timer. Also you can disable this feature by the admin panel.\r\n\r\n### 19/03/2015\r\nCode and installer changed to support minute time storage in INT format instead of hours in decimal via FLOAT\r\n\r\n### 26/03/2015\r\nUpdated / modified installer SQL statement for dropdown list after help from @ReidarBeck & @vipitadmin\r\n\r\n### 28/03/2015\r\nFirst example report created that you can access via the print menu.\r\n\r\n### 17/04/2015\r\nWe have updated the fork and MOD to version v1.9.7\r\n\r\n### 28/06/2015\r\nUpdated the osTicket core to version 1.9.9 and checked all mod working after upgrade.\r\nDocumentation on this forum / post updated\r\nNew images showing changes and new billing report"},"comment":{"url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/comments/125274763","html_url":"https://github.com/osTicket/osTicket-1.8/pull/1419#issuecomment-125274763","issue_url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/1419","id":125274763,"user":{"login":"robintoy","id":8893903,"avatar_url":"https://avatars.githubusercontent.com/u/8893903?v=3","gravatar_id":"","url":"https://api.github.com/users/robintoy","html_url":"https://github.com/robintoy","followers_url":"https://api.github.com/users/robintoy/followers","following_url":"https://api.github.com/users/robintoy/following{/other_user}","gists_url":"https://api.github.com/users/robintoy/gists{/gist_id}","starred_url":"https://api.github.com/users/robintoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robintoy/subscriptions","organizations_url":"https://api.github.com/users/robintoy/orgs","repos_url":"https://api.github.com/users/robintoy/repos","events_url":"https://api.github.com/users/robintoy/events{/privacy}","received_events_url":"https://api.github.com/users/robintoy/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T17:09:56Z","updated_at":"2015-07-27T17:09:56Z","body":"Hi @tornade69\n\nIf I'm reading it right you bill with a minimum of 30 minutes to clients.\n\nThe system at the moment records actual time spent on the ticket, there is a billing report that provides all required chunks to be billed (under print menu).\n\nThe request you have asked does not seem sensible as it is around billing and not actually time spent if you get what I mean??\n\nMaybe it is something we can look at for the billing report?\n\nKind Regards\nRobin\n\nRobin Toy\nDirector\nStrobe Technologies Ltd\n\nSent from my Windows Phone\n________________________________\nFrom: tornade69<mailto:notifications@github.com>\nSent: ‎27/‎07/‎2015 17:53\nTo: osTicket/osTicket-1.8<mailto:osTicket-1.8@noreply.github.com>\nCc: Robin Toy<mailto:robin@strobe-it.co.uk>\nSubject: {Disarmed} Re: [osTicket-1.8] Tickets: Time tracking (#1419)\n\n\nHi @robintoy<https://github.com/robintoy>,\n\nThanks, so i need to use internal note !\n\nFeature request :\ni change my class.ticket.php - function timeSpent and add\n\n$time = ceil($time/30) * 30;\n\nbecause i have time systeme base on minimum time spend.\nMay be you can improve it in config panel.\n\nI do, but i don't understand a this time, osTicket architecture, and class. I try to do some change with xdebug, but nothing good. May be you can tell me good source for begining coding with osTicket.\n\nThanks for all\nRegards,\n\n—\nReply to this email directly or view it on GitHub<https://github.com/osTicket/osTicket-1.8/pull/1419#issuecomment-125269980>.\n\n\n\nRobin Toy\nStrobe Technologies Ltd\nt: 01884 664004\nm: 07588 821979\ne: robin@strobe-it.co.uk<mailto:robin@strobe-it.co.uk>\n\nMaking IT Possible for: Business, Health & Life!\n\n[Follow Us via LinkedIn Logo]<http://www.linkedin.com/company/strobe-it/> [Follows Us via Twitter Logo] <https://twitter.com/StrobeIT/>  [Follow Us via Google+ Logo] <https://plus.google.com/b/100491222414369340300/100491222414369340300/>  [Follow Us via Spiceworks Logo] <http://community.spiceworks.com/service-providers/25927-strobe-technologies-ltd>\n\nPlease consider the environment before printing this E-mail\n\n________________________________\nStrobe IT is the trading name of Strobe Technologies Ltd. Company registration No. 8031223. Registered in England. 1 Emperor Way, Exeter Business Park, Exeter, Devon EX1 3QS\n\nDisclaimer\nInternet communications cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore, we do not accept responsibility for any errors or omissions that are present in this message, or any attachment, that have arisen as a result of e-mail transmission. If verification is required, please request a hard-copy version. Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.\n\nConfidentiality Notice\nThis message (and any associated files) is intended only for the use of the individual or entity to which it is addressed and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not the intended recipient you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. Messages sent to and from us may be monitored.\n\n\n"}}