[rt-users] Time entries as separate transaction type

Thomas Sibley trs at bestpractical.com
Mon Mar 18 19:04:16 EDT 2013


On 03/18/2013 12:57 PM, Maciej Dobrzanski wrote:
> Thanks. I know this exists, but I'm thinking of further extending
> this functionality later which would for example result in storing
> serialized structure rather than just text in such transactions.

That's well outside the scope of RT's normal time tracking
functionality.  Why do you need a serialized structure?

> Using plain comments would mean all that information would be shown
> in ticket history and that would become nothing but noise. I would
> also like to be able to show all time entries to customers, but not
> necessarily all comments.

When you do as I described and enter time worked on the Comment page
without any actual comment message, a comment is never recorded.  Only a
TimeWorked transaction is recorded.  So your customers will see those
entries with ShowTicket and yet still not see comments (provided you
don't grant them ShowTicketComments).

I think you're misunderstanding how the update form works when you have
an empty message and some amount of time worked.  It doesn't create the
normal reply/comment transaction.

> So I am wondering whether my approach for
> adding/using custom transaction type is correct or what are the risks
> of doing that. I'm asking this because of the following comment in
> Transaction.pm:

Transactions are one of the most used parts of RT, and some of the
hairiest to customize.  It's a bit better in 4.2, but that's not
released yet.  If you go down this path, be ready to write Perl and
support your customizations down the road.  I suggest doing it as a
cleanly written extension.

Calling the _NewTransaction method provided by RT::Record is preferred
over RT::Transaction->Create; you should listen to the documentation.
grep the code for examples.



More information about the rt-users mailing list