Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon1.gif   Collapse to Last and Quick Filter , posted by Gabriele Sirri on Sat Jan 2 01:34:57 2010 example.txtelogd.c.patch
    icon2.gif   Re: Collapse to Last and Quick Filter , posted by Stefan Ritt on Tue Jan 12 09:12:28 2010 
       icon2.gif   Re: Collapse to Last and Quick Filter , posted by Gabriele Sirri on Mon Jan 18 02:13:19 2010 
          icon2.gif   Re: Collapse to Last and Quick Filter , posted by Stefan Ritt on Mon Jan 18 08:18:48 2010 
Message ID: 66659     Entry time: Sat Jan 2 01:34:57 2010     Reply to this: 66670
Icon: Entry  Author: Gabriele Sirri  Author Email: sirri@bo.infn.it 
Category: Request  OS: Windows  ELOG Version: 2.7.8-2280 
Subject: Collapse to Last and Quick Filter  
Hello,
   I feel that the filter result could be confusing and unexpected when "COLLAPSE TO LAST" is enabled: you 
filter the first entry but you show the last one. What is filtered doesn't correspond with what is shown (look 
the attached example). 

I suggest to implement an option to let the user decide which entry (first or last) should be retrieved for 
filtering (a tentative patch is attached).

Thank you 

    Gabriele

P.S. A similar behaviour occurs when you sort the logbook: it could appear as not sorted because you sort the 
first entry but the last one is shown.
Attachment 1: example.txt  700 Bytes  Uploaded Sun Jan 3 16:25:16 2010  | Hide | Hide all
Example:

Consider the Status attribute to define the progress of a task:

Attributes     =  Author, Task, Status
Options Status =  Start, Step1, Step2, End
Thread Display =  Task, Status

and logbook with three thread arranged like this:

|-- Task0, Start
|   |-- Task0, Step1
|   |-- Task0, Step2
|
|-- Task1, Start
|   |-- Task1, Step1
|
|-- Task2, Start


It is collapsed to:

+-- Task0, Step2
+-- Task1, Step1
|-- Task2, Start

Now, if you filter the Status using the "Start" value, you obtain again:

+-- Task0, Step2
+-- Task1, Step1
|-- Task2, Start

In my opinion, this is a bit confusing.

Using Step1 or Step2 values, nothing is selected (also confusing).
Attachment 2: elogd.c.patch  927 Bytes  Uploaded Sun Jan 3 16:25:41 2010  | Hide | Hide all
Index: elogd.c
===================================================================
--- elogd.c	(revisione 2280)
+++ elogd.c	(copia locale)
@@ -19539,6 +19539,19 @@
          if (status != EL_SUCCESS)
             break;
 
+         if ( getcfg(lbs->name, "Filter last entry", str, sizeof(str)) && atoi(str) == 1 ) {
+            /* search last entry in this thread */
+            if (reply_to[0]) {
+               search_last_reply(msg_list[index].lbs, &message_id);
+               size = TEXT_SIZE;
+               status =
+                   el_retrieve(msg_list[index].lbs, message_id, date, attr_list, attrib, lbs->n_attr, text,
+                               &size, in_reply_to, reply_to, attachment, encoding, locked_by);
+               if (status != EL_SUCCESS)
+                  break;
+            }
+         }
+
          /* apply filter for attributes */
          for (i = 0; i < lbs->n_attr; i++) {
 
ELOG V3.1.5-fe60aaf