<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 3, 2013 at 11:20 PM, Ryszard Łach <span dir="ltr"><<a href="mailto:ryszard.lach@unity.pl" target="_blank">ryszard.lach@unity.pl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 06/03/13 18:58, Kevin Falcone wrote:<br>
> TimeWorked and Merges is a bit of a mess, but has been cleaned up a<br>
> tiny bit in alter 4.0s and definitely on master (what will be 4.2).<br>
> It'd be a lot easier to get a sense of what you're seeing if you<br>
> showed us the transactions you're looking at. -kevin<br>
<br>
</div>Sure.<br>
<br>
Transactions of the merged ticket:<br>
<br>
id | objecttype | objectid | timetaken | type | field | oldvalue | newvalue<br>
---------+------------+----------+-----------+------------+------------+----------+---------------------------------------<br>
223234 | RT::Group | 94774 | 0 | Create | | |<br>
1484144 | RT::Ticket | 94774 | 0 | Create | | |<br>
1484452 | RT::Ticket | 94774 | 60 | Comment | | |<br>
1486176 | RT::Ticket | 94774 | 61 | Comment | | |<br>
1486211 | RT::Ticket | 94774 | 44 | Comment | | |<br>
1521779 | RT::Ticket | 94774 | 144 | Comment | | |<br>
1526080 | RT::Ticket | 94774 | 0 | Set | Owner | 247901 | 388545<br>
1526573 | RT::Ticket | 94774 | 45 | Comment | | |<br>
1527417 | RT::Ticket | 94774 | 240 | Correspond | | |<br>
1528176 | RT::Ticket | 94774 | 30 | Comment | | |<br>
1529378 | RT::Ticket | 94774 | 100 | Comment | | |<br>
1533693 | RT::Ticket | 94774 | 90 | Comment | | |<br>
1533695 | RT::Ticket | 94774 | 0 | AddLink | MergedInto | | fsck.com-rt://.../ticket/95112<br>
<br>
Transactions of the target ticket<br>
<br>
id | objecttype | objectid | timetaken | type | field | oldvalue | newvalue<br>
---------+------------+----------+-----------+------------+------------+----------+---------------------------------------<br>
224132 | RT::Group | 95112 | 0 | Create | | |<br>
1490734 | RT::Ticket | 95112 | 0 | Create | | |<br>
1493108 | RT::Ticket | 95112 | 0 | Set | Owner | 10 | 22<br>
1493120 | RT::Ticket | 95112 | 0 | Correspond | | |<br>
1493562 | RT::Ticket | 95112 | 0 | Comment | | |<br>
1493664 | RT::Ticket | 95112 | 0 | Set | Owner | 22 | 384890<br>
1493671 | RT::Ticket | 95112 | 10 | Comment | | |<br>
1499857 | RT::Ticket | 95112 | 125 | Comment | | |<br>
1508951 | RT::Ticket | 95112 | 145 | Comment | | |<br>
1533694 | RT::Ticket | 95112 | 0 | Set | TimeWorked | 280 | 1094<br>
1533696 | RT::Ticket | 95112 | 0 | AddLink | MergedInto | | fsck.com-rt://.../ticket/95112<br>
1533711 | RT::Ticket | 95112 | 0 | Set | Owner | 384890 | 22<br>
1533715 | RT::Ticket | 95112 | 0 | Set | Owner | 22 | 388545<br>
1533721 | RT::Ticket | 95112 | 61 | Comment | | |<br>
1535978 | RT::Ticket | 95112 | 0 | Comment | | |<br>
1535980 | RT::Ticket | 95112 | 0 | Status | Status | new | resolved<br>
<br>
<br>
Transaction no. 1533694 has been created to increase TimeWorked in ticket 95112 by sum of timeworked in ticket 94774.<br>
<br>
<br>
However, I found a way: every time I find 'Set TimeWorked' transaction<br>
I'm listing all the transactions of the related ticket, check next one<br>
transaction (after Set TimeWorked) and I skip the Time Worked if the<br>
next one is 'AddLink MergedInto'.<br>
<br>
Not too elegant (some lines of code), but it seems it will have to be<br>
enough for some time, right?<br></blockquote><div><br></div><div style>Yes. It will be. In RT 4.2 upgrade script does similar thing, but also checks that after throwing away all these candiate txtns the time on ticket is consistent with other transactions.</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
<br>
R.<br>
<br>
<br>
<br><br>
<br>
--<br>
RT Training in Seattle, June 19-20: <a href="http://bestpractical.com/training" target="_blank">http://bestpractical.com/training</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Best regards, Ruslan.
</div></div>