Finer-grained due dates

Hi folks,

I would like to be able to set the default due date for a queue down to
the minute.

I’m planning to patch my RT to allow input of the form of “d h s” (days
hours seconds) in the due date input field. Originally I thought I would
just compute a number representing a fraction of a day from this input,
but I see that the due date field doesn’t keep fractions, so I’ll
probably have to turn that field into a float as well.

Does this make sense? Am I missing anything/doing something dumb?

Thanks,

Graeme

P.S. Shall I post a patch back to this list?

Hi Graeme:

I would like to be able to set the default due date for a queue down to
the minute.

Wow, I’m glad you’re not my boss! :wink:

Originally I thought I would
just compute a number representing a fraction of a day from this input,
but I see that the due date field doesn’t keep fractions, so I’ll
probably have to turn that field into a float as well.

I know that both MySQL/postgresql have I timestamp variable, which is
what I would use to do this. It will keep track of the month, day,
year, hour, minute, and second for you, rather than you having to
calculate some type of fraction.

P.S. Shall I post a patch back to this list?

I’m sure someone would find this useful, so that may be a good idea.

-Jeff

Graeme Pyle wrote:

Hi folks,

I would like to be able to set the default due date for a queue down
to the minute.

I’m planning to patch my RT to allow input of the form of “d h s”
(days hours seconds) in the due date input field. Originally I thought
I would just compute a number representing a fraction of a day from
this input, but I see that the due date field doesn’t keep fractions,
so I’ll probably have to turn that field into a float as well.

You are wrong here look at this
select Due from Tickets where unix_timestamp(Due) > 0 limit 1;
Due
2002-12-06 05:00:00
Also RT::Date module can handle time to seconds precision. You only have
to add handling of this information in web forms and output code.

Graeme Pyle wrote:

Howdy,

Yes, Ticket.Due is a datetime, but Queue.DefaultDueIn is an integer.
So I can only specify my default due dates down to the day (i.e. now +
x days).

Correct?

Yeh. You are abuletely right. DefaultDueIn is an int(11) and handled as
days by RT, but you could change it easy.
try it:
cd /path/to/rt/
find . -type f | xargs grep -lE ‘DefaultDueIn’

Good luck. Ruslan.

Graeme Pyle wrote:

Hi folks,

I would like to be able to set the default due date for a queue down
to the minute.

I’m planning to patch my RT to allow input of the form of “d h s”
(days hours seconds) in the due date input field. Originally I thought
I would just compute a number representing a fraction of a day from
this input, but I see that the due date field doesn’t keep fractions,
so I’ll probably have to turn that field into a float as well.

You are wrong here look at this
select Due from Tickets where unix_timestamp(Due) > 0 limit 1;
Due
2002-12-06 05:00:00
Also RT::Date module can handle time to seconds precision. You only have
to add handling of this information in web forms and output code.