1 Title: HW/SW Inventory history: Fixed delta tree computation
11 Previously the delta tree of two numerations was computed in two
14 <li>If the numerations had the same length then we assumed
15 that each row corresponds the other one with the same index.</li>
16 <li>If the numerations had different length then we tried to find
17 corresponding rows which were compared.</li>
19 This might have led to wrong results regarding the <i>new</i>,
20 <i>changed</i> and <i>removed</i> columns on the inventory history
21 page. Either there might be wrong detected or not detected changes.
23 There are two numerations with same rows. If a new row is added ahead
24 to the current numeration and the last row disappears of the current
25 numeration then both numerations have still the same length.
26 Above algorithm compared the rows with the same index and the result
27 is that there are a lot of changed entries. But there is just one new
28 row and one removed row.
30 Now we act the following way:
32 <li>First we extract all identical rows.</li>
33 <li>Then the remaining rows from the old numeration are added to
34 removed rows if there are no remaining rows from the current numeration resp.</li>
35 <li>the remaining rows from the current numeration are added to
36 removed rows if there are no remaining rows from the old numeration.</li>
39 If there are remaining rows from both numerations then we do the following:
41 <li>If the remaining numerations have the same length then we assume
42 that each row corresponds the other one with the same index.</li>
43 <li>If the remaining numerations have different length then we simply
44 add the remaining rows from the old numeration to removed rows and the
45 remaining rows from the current numeration to new rows.</li>