alvarore i think I was able to do this by editing the function that sent emails. I don’t remember anymore sorry, I no longer work for the company I was making the customisation for. But from memory I edited the function that was sending the emails and created a template file that I used and it inserted the body into that template before it sent. Not sure if this would still work in the new version of OS ticket though
BrianT1414 hmmmm not sure what this could be.... I didn't change any of the settings in OST or in O365
i did find this.
Maybe check that out?
Microsoft might have implemented new default settings
https://tech.nicolonsky.ch/device-code-auth-ca/@SteRinaldi glad i could help
Just tried setting them to Auto Detect and saving both settings and its still coming up with the UTC Timezone for my closed today queue.
@KevinTheJedi i have just tried a clean install of 1.12.2 and we are still getting the incorrect timezone on closed today queue. it is using the UTC timezone.
Admin Dashboard Timezone set to Australia/Sydney
PHP date.timezone set to Australia/Sydney
Agent Preferences Timezone set to Australia/Sydney
MySQL timezone matches PHP Timezone.Contrary to my initial belief this does not stem from the bootstrap.php file.
However I am able to replicate this same problem on another server.again:
Admin Dashboard Timezone set to Australia/Sydney
PHP date.timezone set to Australia/Sydney
Agent Preferences Timezone set to Australia/Sydney
MySQL timezone matches PHP Timezone.But closed today still shows everything in UTC time.
I’m currently on 1.12 but will install a copy of 1.12.2 and verify if the issue is still present
Hey @KevinTheJedi yeah tried that as well, it’s not a problem with just one agent profile it’s with everyone’s profiles.
@ntozier seems like someone else raised this quite some time ago
https://github.com/osTicket/osTicket/issues/3141@anitasari i don't actually have it anymore as OST1.12 lets you do this in the admin panel.
Hi @ntozier ,
I have worked out what the cause of this is.
In the bootstrap.php file you do a number of checks against the php.ini default timezone starting on line 35.
However after all of that you then set the default timezone to UTC no matter the outcome of the checks. this is done on line 46commenting out line 46 fixes my issue with the closed today queue being incorrect but it then creates problems with the lock system where no user can post a reply to tickets.
Ticket auth tokens are only dropped on tickets with collaborators.
It is due to the mailing system being changed from multiple messages to a single message using the to and cc fields.
Osticket drops the auth link so that nobody can sign in from that message
Yes the auth links are the ones sent to users so they can just press the link and be logged in.
I would like to weight in on this discussion:
I highly recommend upgrading from 1.10.x to 1.12
Our company uses OSticket for all its service queues and support ticketing as well as development tracking.
We used 1.10.4 for about 2 years prior to the release of 1.12 and could not wait for 1.11 at the time as the prospect of having customizable grids and queues was of huge benefit.Since upgrading we have really seen benefit in the whole custom queue setup, it allows each agent to see only what they need as well as create queues to show high importance tickets.
It has also helped a lot in terms of reporting.
There are a few little things in 1.12 that are frustrating most notable the loss of auth links when sending replying to tickets with collaborators, due to the change in the OST mail logic.
But overall the upgrade has been well worth the wait and it has really helped our organization in management of our tasks and tickets.
@ntozier if you open the first image up in full screen you can see that on the dashboard graph there is a weird floating stat that doesn't seem to belong to any of the trend lines.
Ever since upgrading to 1.12 I have noticed this weird ghost stat on my dashboard.
Just wanted to report it.
Not really an issue or problem.
Just wanted to report it.Resolved it was just that one Queue causing the issue.
It seems like everytime we add a queue for One of my Teams it causes this error.@KevinTheJedi no worries.
I'll get my agents to go through each of their queues and see if we can find the offending one.
I am inclined to believe that the "One of my Teams" variable is causing this issue as it seems that whenever I enable that queue we get the errors.
I will confirm if any of the other offending queues have the same variable.I'll be in touch.
thanks for your help thus far.Thanks for this ID 54 was the system queue "One of my Teams" I've deleted that.
We had previously deleted all queues with a Staff_ID when we first migrated to 1.11 and then to 1.12 I feel if I have to delete them all again the agents will start a war with me.... something akin to game of thrones.....
Is there any way to work out which queue individually is the offending one?
We have been getting the following two errors on repeat, we had over 22 of them come in, within 1 minute.
[SELECT COUNT(*) FROM (SELECT A1.
ticket_id
FROMSupport_ticket
A1 JOINSupport_ticket_status
A2 ON (A1.status_id
= A2.id
) WHERE A1.staff_id
IN (20) AND A2.state
= 'open' AND A1.staff_id
IN (20) AND A2.state
= 'open' AND ) __]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') __' at line 1<br /> <br />
---- Backtrace ----<br />
#0 (root)/include/mysqli.php(199): osTicket->logDBError('DB Error #1064', '[SELECT COUNT(...')<br />
#1 (root)/include/class.orm.php(3455): db_query('SELECT COUNT()...', true, true)<br />
#2 (root)/include/class.orm.php(3511): MySqlExecutor->execute()<br />
#3 (root)/include/class.orm.php(2941): MySqlExecutor->getRow()<br />
#4 (root)/include/class.orm.php(1372): MySqlCompiler->compileCount(Object(QuerySet))<br />
#5 (root)/include/class.search.php(857): QuerySet->count()<br />
#6 (root)/include/class.search.php(928): SavedQueue->getTotal()<br />
#7 (root)/include/class.search.php(865): SavedQueue::counts(Object(StaffSession), true)<br />
#8 (root)/include/staff/templates/queue-tickets.tmpl.php(96): SavedQueue->getCount(Object(StaffSession))<br />
#9 (root)/scp/tickets.php(526): require_once('/home/infrasupp...')<br />
#10 (root)/scp/index.php(17): require('/home/infrasupp...')<br />
#11 {main}
[SELECT COUNT(DISTINCT CASE WHEN A2.
state
= 'open' AND A2.state
= 'open' AND A1.isanswered
= '0' THEN A1.ticket_id
END) ASq45
, COUNT(DISTINCT CASE WHEN A1.staff_id
IN (20) AND A2.state
= 'open' AND A1.staff_id
IN (20) AND A2.state
= 'open' AND A2.state
= 'open' AND A1.staff_id
IN (20) THEN A1.ticket_id
END) ASq43
, COUNT(DISTINCT CASE WHEN A1.staff_id
IN (20) AND A2.state
= 'open' AND A1.staff_id
IN (20) AND A2.state
= 'open' AND THEN A1.ticket_id
END) ASq54
, COUNT(DISTINCT CASE WHEN A2.state
= 'open' THEN A1.ticket_id
END) ASq1
, COUNT(DISTINCT CASE WHEN A2.state
= 'open' AND A2.state
= 'open' AND A1.team_id
= 0 AND A1.staff_id
= 0 THEN A1.ticket_id
END) ASq2
, COUNT(DISTINCT CASE WHEN A2.state
= 'open' AND A2.state
= 'open' AND A2.id
IN (13, 8) THEN A1.ticket_id
END) ASq33
, COUNT(DISTINCT CASE WHEN A2.state
= 'open' AND A2.state
= 'open' AND A2.id
IN (14) THEN A1.ticket_id
END) ASq32
, COUNT(DISTINCT CASE WHEN A2.state
= 'open' AND A2.state
= 'open' AND A2.id
IN (6) THEN A1.ticket_id
END) ASq34
, COUNT(DISTINCT CASE WHEN A2.state
= 'open' AND A2.state
= 'open' AND A1.isoverdue
= '1' THEN A1.ticket_id
END) ASq4
, COUNT(DISTINCT CASE WHEN A1.staff_id
IN (20) AND A2.state
= 'open' THEN A1.ticket_id
END) ASq5
, COUNT(DISTINCT CASE WHEN A2.state
= 'closed' THEN A1.ticket_id
END) ASq8
, COUNT(DISTINCT CASE WHEN A2.state
= 'closed' AND A2.state
= 'closed' AND A1.closed
BETWEEN '2019-05-20 00:00:00' AND '2019-05-20 23:59:59' THEN A1.ticket_id
END) ASq9
, COUNT(DISTINCT CASE WHEN A2.state
= 'closed' AND A2.state
= 'closed' AND A1.closed
BETWEEN '2019-05-19 00:00:00' AND '2019-05-19 23:59:59' THEN A1.ticket_id
END) ASq10
, COUNT(DISTINCT CASE WHEN A2.state
= 'closed' AND A2.state
= 'closed' AND A1.closed
BETWEEN '2019-05-20 00:00:00' AND '2019-05-26 23:59:59' THEN A1.ticket_id
END) ASq11
, COUNT(DISTINCT CASE WHEN A2.state
= 'closed' AND A2.state
= 'closed' AND A1.closed
BETWEEN '2019-05-01 00:00:00' AND '2019-05-31 23:59:59' THEN A1.ticket_id
END) ASq12
, COUNT(DISTINCT CASE WHEN A2.state
= 'closed' AND A2.state
= 'closed' AND A1.closed
BETWEEN '2019-04-01 00:00:00' AND '2019-06-30 23:59:59' THEN A1.ticket_id
END) ASq13
, COUNT(DISTINCT CASE WHEN A2.state
= 'closed' AND A2.state
= 'closed' AND A1.closed
BETWEEN '2019-01-01 00:00:00' AND '2019-12-31 23:59:59' THEN A1.ticket_id
END) ASq14
FROMSupport_ticket
A1 JOINSupport_ticket_status
A2 ON (A1.status_id
= A2.id
) LEFT JOINSupport_thread
A3 ON (A3.object_type
= 'T' AND A1.ticket_id
= A3.object_id
) LEFT JOINSupport_thread_referral
A4 ON (A3.id
= A4.thread_id
) LEFT JOINSupport_staff
A5 ON (A4.object_type
= 'S' AND A4.object_id
= A5.staff_id
) LEFT JOINSupport_department
A6 ON (A4.object_type
= 'D' AND A4.object_id
= A6.id
) WHERE (A2.state
= 'open' AND (A1.staff_id
= 20 OR A5.staff_id
= 20)) OR A1.dept_id
IN (7, 12) OR A6.id
IN (7, 12)]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'THEN A1.
ticket_id
END) ASq54
, COUNT(DISTINCT CASE WHEN A2.state
= 'open' ' at line 1<br /> <br />
---- Backtrace ----<br />
#0 (root)/include/mysqli.php(199): osTicket->logDBError('DB Error #1064', '[SELECT COUNT(D...')<br />
#1 (root)/include/class.orm.php(3455): db_query('SELECT COUNT(DI...', true, true)<br />
#2 (root)/include/class.orm.php(3502): MySqlExecutor->execute()<br />
#3 (root)/include/class.orm.php(2085): MySqlExecutor->getArray()<br />
#4 (root)/include/class.orm.php(2035): HashArrayIterator->{closure}()<br />
#5 (root)/include/class.orm.php(2014): CallbackSimpleIterator->next()<br />
#6 (root)/include/class.orm.php(2023): CallbackSimpleIterator->rewind()<br />
#7 (root)/include/class.orm.php(1695): CallbackSimpleIterator->valid()<br />
#8 (root)/include/class.orm.php(1705): CachedResultSet->fillTo(9223372036854775807)<br />
#9 (root)/include/class.orm.php(1328): CachedResultSet->asArray()<br />
#10 (root)/include/class.orm.php(1351): QuerySet->all()<br />
#11 (root)/include/class.search.php(925): QuerySet->one()<br />
#12 (root)/scp/autocron.php(51): SavedQueue::counts(Object(StaffSession), false)<br />
#13 {main}
@ntozier I have now tested both Agent and End-User replies waiting for ticket draft to be saved before pressing the reply with a file attached and I have not been able to replicate the duplicate ID error.