unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* debbugs-gnu-bugs shows unanswered bugs as handled
@ 2016-06-04  4:10 Tino Calancha
  2016-06-04  8:25 ` Michael Albinus
  0 siblings, 1 reply; 6+ messages in thread
From: Tino Calancha @ 2016-06-04  4:10 UTC (permalink / raw)
  To: michael.albinus, larsi; +Cc: emacs-devel


My version of debbugs is: 0.9.5

I)

debbugs-gnu-bugs may show a bug with face debbugs-gnu-handled
even though such bug has not being answered yet.

Current implementation assumes a bug as new (not answered yet)
whenever attributes 'date and 'log_modified satisfies
predicate '=.

But for some new bugs 'date and 'log_modified may differ in 1 second.
For instance, the bugs:
23686,23685,23682,23679,23659,23651,23645,23639,23629,23619,23597,23590

***
The patch (see below) solve this issue relaxing the condition to
'log_modified - 'date < 3.


II)

Another issue with the predicate to assign face 'debbugs-gnu-new
is that it may consider as answered a bug where only the OP sent info.

For instance, let's suppose one user, FOO, send a bug report; some minutes
later, FOO send another e-mail (to same bug) adding extra information.

Current implementation shows that bug with face 'debbugs-gnu-handled.

That may cause the Emacs maintainers to think that someone is already
taking care on that issue.
It would be better if such bugs would not get 'debbugs-gnu-handled
face until some Emacs maintainer have already answered it.

Examples of this are:
23638,23630,23621,23617,23602,23574,23593

***
I don't see easy way to solve this with current implementation.

Could be added a new attribute 'ncommunicators' to the status of a bug?

The value of this attribute could be defined as:
(length (delete-dups (from-list)))

where from-list is a list with the FROM field of all the e-mails
on that bug.

Then, `debbugs-get-status' would have such attribute set to 1 by
default; once the bug receive an answer from a different e-mail than
the OP then 'ncommunicators' would change to 2, and so on.

Tino


--- /tmp/ediff2583b8i	2016-06-04 12:39:37.169388859 +0900
+++ /home/calancha/.emacs.d/elpa/debbugs-0.9.5/debbugs-gnu.el	2016-06-03 19:40:12.644524320 +0900
@@ -668,8 +668,8 @@
  		'debbugs-gnu-done)
  	       ((member "pending" (cdr (assq 'keywords status)))
  		'debbugs-gnu-pending)
-	       ((< (abs (- (cdr (assq 'date status))
-                       (cdr (assq 'log_modified status)))) 3)
+	       ((= (cdr (assq 'date status))
+		   (cdr (assq 'log_modified status)))
  		'debbugs-gnu-new)
  	       ((< (- (float-time)
  		      (cdr (assq 'log_modified status)))



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: debbugs-gnu-bugs shows unanswered bugs as handled
  2016-06-04  4:10 debbugs-gnu-bugs shows unanswered bugs as handled Tino Calancha
@ 2016-06-04  8:25 ` Michael Albinus
  2016-06-05 14:50   ` Tino Calancha
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Albinus @ 2016-06-04  8:25 UTC (permalink / raw)
  To: Tino Calancha; +Cc: larsi, emacs-devel

Tino Calancha <tino.calancha@gmail.com> writes:

Hi Tino,

> debbugs-gnu-bugs may show a bug with face debbugs-gnu-handled
> even though such bug has not being answered yet.
>
> The patch (see below) solve this issue relaxing the condition to
> 'log_modified - 'date < 3.

Thanks for this. I've committed it to the ELPA repo. There are some few
other points on my debbugs todo list; will fix them over the
weekend. After this, debbugs 0.9.6 will be released.

> Another issue with the predicate to assign face 'debbugs-gnu-new
> is that it may consider as answered a bug where only the OP sent info.
>
> I don't see easy way to solve this with current implementation.
>
> Could be added a new attribute 'ncommunicators' to the status of a bug?

That's not possible. `debbugs-get-status' retrieves all information via
the Debbugs SOAP interface which are available, see its docstring. You
could check the attributes also in the *Emacs Bugs* buffer, typing "d"
(à la "debug") over a bug. The only exception here is "cache_time", this
attribute is added by debbugs.el.

Extending the SOAP interface this way is out of our scope, I fear. And
it would also decrease the performance.

I will add a note to the User Guide about this deficiency.

> Tino

Best regards, Michael.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: debbugs-gnu-bugs shows unanswered bugs as handled
  2016-06-04  8:25 ` Michael Albinus
@ 2016-06-05 14:50   ` Tino Calancha
  2016-06-05 15:29     ` Michael Albinus
  0 siblings, 1 reply; 6+ messages in thread
From: Tino Calancha @ 2016-06-05 14:50 UTC (permalink / raw)
  To: Michael Albinus; +Cc: larsi, emacs-devel, Tino Calancha

[-- Attachment #1: Type: text/plain, Size: 2509 bytes --]


Hi Michael,

> Thanks for this. I've committed it to the ELPA repo. There are some few
> other points on my debbugs todo list; will fix them over the
> weekend. After this, debbugs 0.9.6 will be released.
Thank you very much. This is going to be useful to avoid adding
extra delay on the time to process a bug.

> That's not possible. `debbugs-get-status' retrieves all information via
> the Debbugs SOAP interface which are available, see its docstring.
> Extending the SOAP interface this way is out of our scope, I fear. And
> it would also decrease the performance.
Hummm, i see :-(
Yeah, i agree this package is working very nice.  It's good to keep it as 
it is avoiding overloads in the server.

> could check the attributes also in the *Emacs Bugs* buffer, typing "d"
> (à la "debug") over a bug.
Thank you, i wasn't aware of this.  It's handy.
It could help to solve the second problem that i reported
(OP sending 2 e-mails, and the bug is classified as handled regarless on 
if there is any other person answering: e.g. Bug#23694)
without the need to add a new attribute.

This is my point.
I am sorry if the following has no sense at all: I am not really
familiar with how the bug attributes are filled.

I see that _whenever_ one bug is solved, the attribute 'done gets as value
the name of the maintainer who handled the issue.

Unfortunately, i don't see that the field 'owner gets always a value.
AFAICT it never gets a value.  Why this field is not always updated?

If each time that one maintainer answer one bug, the field
'owner would be updated (adding get his/her name if still not there)
then it would be trivial to classify one bug as 'new or 'handled.

Wouldn't be ok if 'owner gets as value one list of maintaneirs?
I would suggest the value of 'owner to be all the maintainers
answering such bug.
Actually, often more than 1 maintaneir answer the same bug.
The 'done field would keep the same as currently: the name of the
maintaneir making the commit to the repository.

If so, it  would not be a problem any more if just the OP send 2 e-mails:

***
as far as there is no value for 'owner then the bug would not be 
handled yet.
***
Currently, this cannot be done now because 'owner is not systematically 
filled with a value.

Of course, if the OP is a person with commit rights in the
repository he/she could be the OP and the owner at the same time:
he/she would be handling his/her own bug report.


Regards,

Tino

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: debbugs-gnu-bugs shows unanswered bugs as handled
  2016-06-05 14:50   ` Tino Calancha
@ 2016-06-05 15:29     ` Michael Albinus
  2016-06-08 13:29       ` Tino Calancha
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Albinus @ 2016-06-05 15:29 UTC (permalink / raw)
  To: Tino Calancha; +Cc: larsi, emacs-devel

Tino Calancha <tino.calancha@gmail.com> writes:

> Hi Michael,

Hi Tino,

> Unfortunately, i don't see that the field 'owner gets always a value.
> AFAICT it never gets a value.  Why this field is not always updated?
>
> If each time that one maintainer answer one bug, the field
> 'owner would be updated (adding get his/her name if still not there)
> then it would be trivial to classify one bug as 'new or 'handled.

The idea of `owner' is different. It is not set automatically. But
everybody is allowd to declare herself as owner of a bug, by sending an
appropriate control message to the debbugs server, see the section "3.3
Control Messages" of the debbugs user guide. With this a developer
declares publicly, that she is working on the bug, and nobody else needs
to care about.

This would be a valuable information. Sadly, as you have observed, this
is used rarely. I have done it for some few bugs (4604,6850,8860).

> Wouldn't be ok if 'owner gets as value one list of maintaneirs?
> I would suggest the value of 'owner to be all the maintainers
> answering such bug.

No, because if somebody is answering to a bug it doesn't mean she feels
responsible for that bug.

> Regards,
>
> Tino

Best regards, Michael.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: debbugs-gnu-bugs shows unanswered bugs as handled
  2016-06-05 15:29     ` Michael Albinus
@ 2016-06-08 13:29       ` Tino Calancha
  2016-06-11 17:56         ` Michael Albinus
  0 siblings, 1 reply; 6+ messages in thread
From: Tino Calancha @ 2016-06-08 13:29 UTC (permalink / raw)
  To: Michael Albinus; +Cc: larsi, emacs-devel, Tino Calancha



Thank you Michael for the answer!  Very clear.

On Sun, 5 Jun 2016, Michael Albinus wrote:
>The idea of `owner' is different. It is not set automatically.
I see there is no straight way to fix it.  So sad :-(
From now on i will not send the second email on my own bug
reports, except pings :-)

I have found 2 more issues code (added patches at the end of the email).

I)
    I have noticed the code uses the attributes 'submitter and 'author
    as synonymous: tipically they have same value but not always.
    For instance try folowing example:

[OK]
M-x debbugs-gnu-search RET
nuisance AND asked RET RET
;; list bugs: 19328, 23680

[BAD]
M-x debbugs-gnu-search RET
nuisance AND asked RET submitter camdez@gmail.com RET RET
;; Don't show bugs because author and submitter are not equivalent;
;; for instance, in bug#19328, the submitter is camdez@gmail.com
;; but the author is drew.adams@oracle.com.


II)
    I guess attribute 'status should be handled also in the client side.

    See for instance,

[BAD]
(setq debbugs-gnu-default-suppress-bugs nil) ; show bugs with status "done"
M-x debbugs-gnu-search RET
nuisance AND asked RET status done RET RET
;; Don't show any bug



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Following patches fix I) and II).

Please, note that on debbugs.el
i have modified just
debbugs-search-est

There is other uses of :submitter on that file (e.g. debbugs-get-bugs);
i am wondering if they also need to be fixed (i didn't look on it).

Regards,
Tino
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

From d9f5968d762edc62f45d251cbcc0d37e2183f66d Mon Sep 17 00:00:00 2001
From: Tino Calancha <f92capac@gmail.com>
Date: Wed, 8 Jun 2016 21:38:45 +0900
Subject: [PATCH 1/3] * debbugs-gnu.el (debbugs-gnu-search): submitter and
  author fields are not identical: the former is handled on the client side;
  the latter on the server side.   (debbugs-gnu-get-bugs): Idem.

* debbugs.el (debbugs-search-est): Attribute :submitter searched on
the client side.
---
  debbugs-gnu.el | 27 +++++++++++++++++++++------
  debbugs.el     |  7 ++++---
  2 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 8ec7a32..f2874d3 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -370,13 +370,14 @@ marked as \"client-side filter\"."
  	    (setq key (completing-read
  		       "Enter attribute: "
  		       (if phrase
-			   '("severity" "package" "tags" "submitter" "date"
-			     "subject" "status")
+			   '("severity" "package" "tags" "author" "date"
+			     "subject" "status" "submitter")
  			 '("severity" "package" "archive" "src" "tag"
-			   "owner" "submitter" "maint" "correspondent"
+			   "owner" "author" "maint" "correspondent"
  			   "date" "log_modified" "last_modified"
  			   "found_date" "fixed_date" "unarchived"
-			   "subject" "done" "forwarded" "msgid" "summary"))
+			   "subject" "done" "forwarded" "msgid" "summary"
+               "submitter"))
  		       nil t))
  	    (cond
  	     ;; Server-side queries.
@@ -404,11 +405,11 @@ marked as \"client-side filter\"."
  		(add-to-list
  		 'debbugs-gnu-current-query (cons (intern key) val1))))

-	     ((member key '("owner" "submitter" "maint" "correspondent"))
+	     ((member key '("owner" "author" "maint" "correspondent"))
  	      (setq val1 (read-string "Enter email address: "))
  	      (when (not (zerop (length val1)))
  		(add-to-list
-		 'debbugs-gnu-current-query (cons (intern key) val1))))
+		 'debbugs-gnu-current-query (cons (intern "@author") val1))))

  	     ((equal key "status")
  	      (setq
@@ -457,6 +458,17 @@ marked as \"client-side filter\"."
  		     'debbugs-gnu-current-query 'debbugs-gnu-current-filter)
  		 (cons (intern key) (cons val1 val2)))))

+         ;; Additional client-side filters.
+         ((equal key "submitter")
+          (setq val1 (read-string "Enter email address: "))
+          (when (string-equal "me" val1)
+            (setq val1 user-mail-address))
+          (when (string-match "<\\(.+\\)>" val1)
+            (setq val1 (match-string 1 val1)))
+          (when (not (zerop (length val1)))
+            (add-to-list
+             'debbugs-gnu-current-filter (cons (intern "originator") val1))))
+
  	     ((not (zerop (length key)))
  	      (setq val1
  		    (funcall
@@ -561,6 +573,9 @@ marked as \"client-side filter\"."
  		    ((eq (car elt) 'date)
  		     (list (list :date (cddr elt) (cadr elt)
  				 :operator "NUMBT")))
+            ((eq (car elt) 'author)
+             (list (list :@author (cdr elt)
+                         :operator "ISTRINC")))
  		    (t
  		     (list (list (intern (concat ":" (symbol-name (car elt))))
  				 (cdr elt) :operator "ISTRINC"))))
diff --git a/debbugs.el b/debbugs.el
index 422a775..6462f05 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -574,8 +574,9 @@ The following conditions are possible:
    :date, :@cdate -- The submission or modification dates of a
    message, a number.

-  :submitter, :@author -- The email address of the submitter of a
-  bug or the author of a message belonging to this bug, a string.
+  :@author -- The email address of the author of a message
+  belonging to this bug, a string.  It may be different than
+  the email of the person submitting the bug.
    The special email address \"me\" is used as pattern, replaced
    with `user-mail-address'.

@@ -723,7 +724,7 @@ Examples:
  		 (error "Wrong %s: %s" key val)))

  	      ;; Attribute condition.
-	      ((:submitter :@author)
+	      (:@author
  	       ;; It shouldn't happen in a phrase condition.
  	       (if phrase-cond
  		   (error "Wrong keyword: %s" kw))
-- 
2.8.1

From 3f466b17abd51910b225894ce87cf7c47748f441 Mon Sep 17 00:00:00 2001
From: Tino Calancha <f92capac@gmail.com>
Date: Wed, 8 Jun 2016 21:42:05 +0900
Subject: [PATCH 2/3] * debbugs-gnu.el (debbugs-gnu-search): Attribute status
  is searched on the client side. * debbugs.el (debbugs-search-est): Idem.

---
  debbugs-gnu.el | 20 ++++++++++----------
  debbugs.el     | 20 --------------------
  2 files changed, 10 insertions(+), 30 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index f2874d3..c73d462 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -377,7 +377,7 @@ marked as \"client-side filter\"."
  			   "date" "log_modified" "last_modified"
  			   "found_date" "fixed_date" "unarchived"
  			   "subject" "done" "forwarded" "msgid" "summary"
-               "submitter"))
+               "status" "submitter"))
  		       nil t))
  	    (cond
  	     ;; Server-side queries.
@@ -409,15 +409,7 @@ marked as \"client-side filter\"."
  	      (setq val1 (read-string "Enter email address: "))
  	      (when (not (zerop (length val1)))
  		(add-to-list
-		 'debbugs-gnu-current-query (cons (intern "@author") val1))))
-
-	     ((equal key "status")
-	      (setq
-	       val1
-	       (completing-read "Enter status: " '("done" "forwarded" "open")))
-	      (when (not (zerop (length val1)))
-		(add-to-list
-		 'debbugs-gnu-current-query (cons (intern key) val1))))
+         'debbugs-gnu-current-query (cons (intern "@author") val1))))

  	     ;; Client-side filters.
  	     ((member key '("date" "log_modified" "last_modified"
@@ -469,6 +461,14 @@ marked as \"client-side filter\"."
              (add-to-list
               'debbugs-gnu-current-filter (cons (intern "originator") val1))))

+         ((equal key "status")
+          (setq
+           val1
+           (completing-read "Enter status: " '("pending" "forwarded" "fixed" "done")))
+          (when (not (zerop (length val1)))
+            (add-to-list
+             'debbugs-gnu-current-filter (cons (intern "pending") val1))))
+
  	     ((not (zerop (length key)))
  	      (setq val1
  		    (funcall
diff --git a/debbugs.el b/debbugs.el
index 6462f05..36b5fb8 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -565,9 +565,6 @@ The following conditions are possible:

    ATTRIBUTE is one of the following keywords:

-  :status --  Status of bug.  Valid values are \"done\",
-  \"forwarded\" and \"open\".
-
    :subject, :@title -- The subject of a message or the title of
    the bug, a string.

@@ -743,23 +740,6 @@ Examples:
  		 (setq vec
  		       (vconcat vec (list key (mapconcat #'identity val " "))))))

-	      (:status
-	       ;; It shouldn't happen in a phrase condition.
-	       (if phrase-cond
-		   (error "Wrong keyword: %s" kw))
-	       (setq attr-cond t)
-	       (if (not (stringp (car elt)))
-		   (setq vec (vconcat vec (list key "")))
-		 ;; Possible values: "done", "forwarded" and "open"
-		 (while  (and (stringp (car elt))
-			      (string-match
-			       "\\`\\(done\\|forwarded\\|open\\)\\'" (car elt)))
-		   (let ((x (pop elt)))
-		     (unless (member x val)
-		       (setq val (append val (list x))))))
-		 (setq vec
-		       (vconcat vec (list key (mapconcat #'identity val " "))))))
-
  	      ((:subject :package :tags :severity :@title)
  	       ;; It shouldn't happen in a phrase condition.
  	       (if phrase-cond
-- 
2.8.1

From dbbdb7e4d75a79f878d5c0ec9034c016f3fc59f1 Mon Sep 17 00:00:00 2001
From: Tino Calancha <f92capac@gmail.com>
Date: Wed, 8 Jun 2016 21:45:38 +0900
Subject: [PATCH 3/3] * debbugs-ug.texi (Searching in the Debbugs Database):
  Fix typo

---
  debbugs-ug.texi | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debbugs-ug.texi b/debbugs-ug.texi
index 553e19b..045e9d1 100644
--- a/debbugs-ug.texi
+++ b/debbugs-ug.texi
@@ -176,7 +176,7 @@ AND is used by default.

  Wild card searches are also supported.  It can be used for forward
  match search and backward match search.  For example, "[BW] euro"
-matches words which begin with "euro".  "[EW] shere" matches words
+matches words which begin with "euro".  "[EW] sphere" matches words
  which end with "sphere".  Moreover, regular expressions are also
  supported.  For example, "[RX] ^inter.*al$" matches words which begin
  with "inter" and end with "al".@footnote{Simplified forms, as
-- 
2.8.1






^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: debbugs-gnu-bugs shows unanswered bugs as handled
  2016-06-08 13:29       ` Tino Calancha
@ 2016-06-11 17:56         ` Michael Albinus
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Albinus @ 2016-06-11 17:56 UTC (permalink / raw)
  To: Tino Calancha; +Cc: larsi, emacs-devel

Tino Calancha <tino.calancha@gmail.com> writes:

Hi Tino,

> I have found 2 more issues code (added patches at the end of the email).
>
> I)
>    I have noticed the code uses the attributes 'submitter and 'author
>    as synonymous: tipically they have same value but not always.

>    For instance try folowing example:
>
> [OK]
> M-x debbugs-gnu-search RET
> nuisance AND asked RET RET
> ;; list bugs: 19328, 23680
>
> [BAD]
> M-x debbugs-gnu-search RET
> nuisance AND asked RET submitter camdez@gmail.com RET RET
> ;; Don't show bugs because author and submitter are not equivalent;
> ;; for instance, in bug#19328, the submitter is camdez@gmail.com
> ;; but the author is drew.adams@oracle.com.

You are right. `debbugs-search-est' expects :@author, and not
:submitter. I've modified your patch slightly, and we get now

M-x debbugs-gnu-search RET
nuisance AND asked RET RET
;; List bugs: 19328, 23680

M-x debbugs-gnu-search RET
nuisance AND asked RET author drew.adams@oracle.com RET RET
;; List bugs: 19328. There was another error, encoding "@" for the
;; Debbugs::SOAP Perl module, which I have also fixed.

> II)
>    I guess attribute 'status should be handled also in the client side.
>
>    See for instance,
>
> [BAD]
> (setq debbugs-gnu-default-suppress-bugs nil) ; show bugs with status "done"
> M-x debbugs-gnu-search RET
> nuisance AND asked RET status done RET RET
> ;; Don't show any bug

That's not possible. Status is applicable for server-side filtering only
with a non-empty phrase. I've fixed this.

Client-side filtering is applied only for searches with an empty
phrase. Your use case is not foreseen (yet).

In general, client-side filtering should not promoted to the users. It
has bad performance, because it needs to retrieve all bugs first, before
it could start to filter. It's always better to promote server-side
filtering.

> There is other uses of :submitter on that file (e.g. debbugs-get-bugs);
> i am wondering if they also need to be fixed (i didn't look on it).

Haven't looked either, but it shall be OK.

> Regards,
> Tino

Best regards, Michael.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-11 17:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-04  4:10 debbugs-gnu-bugs shows unanswered bugs as handled Tino Calancha
2016-06-04  8:25 ` Michael Albinus
2016-06-05 14:50   ` Tino Calancha
2016-06-05 15:29     ` Michael Albinus
2016-06-08 13:29       ` Tino Calancha
2016-06-11 17:56         ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).