TimeTaken shows 0 minutes instead of 15 mins

mysql> select TimeTaken from Transactions where id = 7391416;
| TimeTaken |
| 0 |

mysql> select TimeWorked from Tickets where id = 1188802;
| TimeWorked |
| 15 |
1 row in set (0.00 sec)

Transaction 7391416 is part of the Ticket 1188802 where the time
worked was 15 mins.

What gives?

Using RT 3.8.2 with mysql 5.0.75

Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Asif,

mysql> select TimeTaken from Transactions where id = 7391416;

mysql> select TimeWorked from Tickets where id = 1188802;

Transaction 7391416 is part of the Ticket 1188802 where the time
worked was 15 mins.

What gives?

Using RT 3.8.2 with mysql 5.0.75

It depends on what actions were taken during the transaction.

If time was entered during the ticket creation, the TimeTaken value is filled in.

If a comment or such was entered and time was entered against the action, it is created as TimeWorked with an NewValue / TimeWorked.

To work out how much time a given transaction took, you need to do some math, (MySQL SQL follows):

SELECT
SUM(Transactions.TimeTaken) + SUM(
IF(Transactions.OldValue != Transactions.NewValue,
Transactions.NewValue - Transactions.OldValue,
0)
) AS TimeWorked
FROM
Transactions
WHERE
Field = ‘TimeWorked’
AND ObjectType = 'RT::Ticket
AND ObjectId = 1188802;

Adds all the TimeTaken values to the differences in OldValue and NewValue on TimeWorked for a given ticket.

Stuart

mysql> select TimeTaken from Transactions where id = 7391416;
±----------+
| TimeTaken |
±----------+
| 0 |
±----------+

mysql> select TimeWorked from Tickets where id = 1188802;
±-----------+
| TimeWorked |
±-----------+
| 15 |
±-----------+
1 row in set (0.00 sec)

Transaction 7391416 is part of the Ticket 1188802 where the time
worked was 15 mins.

What gives?

Using RT 3.8.2 with mysql 5.0.75

There is a fix, but it gets into RT 4.2.


Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


Help improve RT by taking our user survey: https://www.surveymonkey.com/s/N23JW9T

Best regards, Ruslan.

Asif,

mysql> select TimeTaken from Transactions where id = 7391416;

mysql> select TimeWorked from Tickets where id = 1188802;

Transaction 7391416 is part of the Ticket 1188802 where the time
worked was 15 mins.

What gives?

Using RT 3.8.2 with mysql 5.0.75

It depends on what actions were taken during the transaction.

user went ‘The Basics’ box and changed the Worked: box value from 0' to 15’

Ticket 1188802: TimeWorked changed from ‘0’ to ‘15’

If time was entered during the ticket creation, the TimeTaken value is filled in.

If a comment or such was entered and time was entered against the action, it is created as TimeWorked with an NewValue / TimeWorked.

To work out how much time a given transaction took, you need to do some math, (MySQL SQL follows):

SELECT
SUM(Transactions.TimeTaken) + SUM(
IF(Transactions.OldValue != Transactions.NewValue,
Transactions.NewValue - Transactions.OldValue,
0)
) AS TimeWorked
FROM
Transactions
WHERE
Field = ‘TimeWorked’
AND ObjectType = 'RT::Ticket
AND ObjectId = 1188802;

Adds all the TimeTaken values to the differences in OldValue and NewValue on TimeWorked for a given ticket.

Stuart

Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?