[URGENT] Splitting ticket, maintain date received?

Moderator: crythias

Locked
kmdot
Znuny newbie
Posts: 68
Joined: 16 Dec 2010, 18:46
Znuny Version: 3

[URGENT] Splitting ticket, maintain date received?

Post by kmdot »

Hi

I need to be able to split tickets but keep the original date that it was received.

This is because some people open tickets with loads of issues, and most the time each issue needs its own ticket. So I was thinking of using the split feature, but it creates a ticket from new, rather than duplicating the old ticket?

any ideas?

Really, i want to just duplicate a ticket.

thanks
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: [URGENT] Splitting ticket, maintain date received?

Post by crythias »

It's not possible without enhancement/development. I understand, generally, what you're asking to do, and the ticket splits still link to the original ticket... If you Parent/Child the ticket split, it could help a bit. Otherwise, splitting the ticket the day you get it (yes, I know, not always possible) mitigates somewhat.

Kernel/System/Ticket.pm holds the TicketCreate sub, which is coded to use current_timestamp for all created tickets.

Code: Select all

    # create db record
    return if !$Self->{DBObject}->Do(
        SQL =>
            'INSERT INTO ticket (tn, title, create_time_unix, type_id, queue_id, ticket_lock_id,'
            . ' user_id, responsible_user_id, group_id, ticket_priority_id, ticket_state_id,'
            . ' ticket_answered, escalation_time, escalation_update_time, escalation_response_time,'
            . ' escalation_solution_time, timeout, service_id, sla_id, until_time,'
            . ' valid_id, archive_flag, create_time, create_by, change_time, change_by)'
            . ' VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0, 0, 0, 0, 0, 0, ?, ?, 0, ?, ?,'
            . ' current_timestamp, ?, current_timestamp, ?)',
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
kmdot
Znuny newbie
Posts: 68
Joined: 16 Dec 2010, 18:46
Znuny Version: 3

Re: [URGENT] Splitting ticket, maintain date received?

Post by kmdot »

So if i modify

. ' current_timestamp, ?, current_timestamp, ?)',

with the received date stamp, will that solve the issue?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: [URGENT] Splitting ticket, maintain date received?

Post by crythias »

It's a bit more involved than that. You'd have to find a way to inherit the original ticket's create stamp in the split and pass it to TicketCreate.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked