Hi All,
I am not programer so might be this is the dumb questions.
I have found old post https://github.com/osTicket/osTicket/pull/3231/ which is related to timesheet mod implemented on 1.10.x version. I think that is working on that version and seems kinda similar to the current version.
DB level changes
INSERT 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());
INSERT INTO `ost_list_items` (`list_id`, `status`, `value`, `sort`)
SELECT ost_list.id, 1, 'Telephone', 1
FROM ost_list
WHERE `name`='Time Type';
INSERT INTO `ost_list_items` (`list_id`, `status`, `value`, `sort`)
SELECT ost_list.id, 1, 'Email', 2
FROM ost_list
WHERE `name`='Time Type';
INSERT INTO `ost_list_items` (`list_id`, `status`, `value`, `sort`)
SELECT ost_list.id, 1, 'Remote', 3
FROM ost_list
WHERE `name`='Time Type';
INSERT INTO `ost_list_items` (`list_id`, `status`, `value`, `sort`)
SELECT ost_list.id, 1, 'Workshop', 4
FROM ost_list
WHERE `name`='Time Type';
INSERT INTO `ost_list_items` (`list_id`, `status`, `value`, `sort`)
SELECT ost_list.id, 1, 'Onsite', 5
FROM ost_list
WHERE `name`='Time Type';
INSERT INTO ost_config (`namespace`, `key`, `value`, `updated`) VALUES
('core', 'isclienttime', 0, now()),
('core', 'isthreadtime', 0, now()),
('core', 'isthreadtimer', 0, now()),
('core', 'isthreadbill', 0, now()),
('core', 'isthreadbilldefault', 0, now()),
('core', 'istickethardware', 0, now());
ALTER TABLE ost_thread_entry ADD COLUMN time_spent INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' AFTER type;
ALTER TABLE ost_thread_entry ADD COLUMN time_type INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' AFTER time_spent;
ALTER TABLE ost_thread_entry ADD COLUMN time_bill INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' AFTER time_type;
Pages which was replaced
If need to see code level changes i have uploaded at https://github.com/amitsol22/ost151
include/class.config.php
include/class.nav.php
include/class.thread.php
include/class.ticket.php
include/client/view.inc.php
include/i18n/en_US/help/tips/settings.tickettime.yaml
include/i18n/en_US/list.yaml
include/staff/org-view.inc.php
include/staff/settings-tickettime.inc.php
include/staff/templates/thread-entry.tmpl.php
include/staff/templates/ticket-print.tmpl.php
include/staff/ticket-view.inc.php
scp/org_bill.php
scp/settings.php
scp/tickets_bill.php
scp/tickets_cost.php
i have deployed first version 1.15.1 on the php7.2.24 with apache 2.4.29 and its run successfully. When i did DB level changes as suggested and changed pages which was mentioned its stop working and not able to see any page.
I am getting below error on the apache error logs .
Any help is really appriciated.
[Fri Jan 01 16:01:07.628437 2021] [php7:error] [pid 9696] [client 49.37.148.210:53274] PHP Fatal error: Uncaught Error: Call to undefined method OsticketConfig::forceHttps() in /var/www/html/ost-1.15.1/main.inc.php:36\nStack trace:\n#0 /var/www/html/ost-1.15.1/scp/login.php(16): require_once()\n#1 {main}\n thrown in /var/www/html/ost-1.15.1/main.inc.php on line 36
[Fri Jan 01 16:01:19.364917 2021] [php7:error] [pid 9684] [client 49.37.148.210:53277] PHP Fatal error: Uncaught Error: Call to undefined method OsticketConfig::forceHttps() in /var/www/html/ost-1.15.1/main.inc.php:36\nStack trace:\n#0 /var/www/html/ost-1.15.1/scp/login.php(16): require_once()\n#1 {main}\n thrown in /var/www/html/ost-1.15.1/main.inc.php on line 36