After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 364731 - No support for negative scores
No support for negative scores
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.8.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2006-10-24 15:19 UTC by Sebastien Bacher
Modified: 2007-07-09 03:12 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
proposed patch (897 bytes, patch)
2007-07-03 10:35 UTC, Milan Crha
committed Details | Review

Description Sebastien Bacher 2006-10-24 15:19:00 UTC
That bug has been opened on https://launchpad.net/distros/ubuntu/+source/evolution/+bug/67776

"Description of the problem:
Attempting to create a search with a negative score results in an error dialog.

Steps to reproduce:
1. Start evolution.
2. Click on a mail folder (e.g. On this Computer -> Inbox).
3. Go to Search -> Advanced Search...
4. In the Advanced Search dialog change the first Subject to Score and click the down arrow to turn the 0 to -1.
5. Click OK.

Expected results:
A search to be run.

Actual results:
Error dialog appears saying:
"Error while Generating message list.

Cannot parse search expression: Unknown identifier: -1:
(and (match-all (and (not (system-flag "deleted")) (not (system-flag "junk"))))
 (and (or

       (match-all (= (cast-int (user-tag "score")) -1))

  (match-all (header-contains "From" ""))
  )
 ))"

Version Information:
evolution 2.8.1-0ubuntu4"
Comment 1 André Klapper 2007-07-02 22:46:00 UTC
the help doc says:
"Sets the message score to any whole number greater than 0."

this is not a bug in my opinion.
Comment 2 Sebastien Bacher 2007-07-03 07:27:21 UTC
the bug is that the widget allows to use -1
Comment 3 André Klapper 2007-07-03 09:07:55 UTC
ah...
Comment 4 Milan Crha 2007-07-03 10:35:03 UTC
Created attachment 91090 [details] [review]
proposed patch

for evolution-data-server;

I think the limits for score between -3..+3 is ok, so I did change in parser, where was allowed to start identifiers with '+' or '-' too, even those are unary operators. Other characters "<=>?" are strange to me too, but I kept them there.
Comment 5 Brian J. Murrell 2007-07-04 20:04:24 UTC
OK, but I also get an error when trying to "Adjust Score" by a negative amount:

Error while Filtering Selected Messages.
Error parsing filter: Unknown identifier: -3: (begin
(set-color "#e6db2000cd9f")
  (adjust-score -3)
)

Certainly one must be able to reduce the score of a message, yes?
Comment 6 Srinivasa Ragavan 2007-07-05 11:48:35 UTC
This patch fixes everything when I tested. Please commit to head.
Comment 7 Srinivasa Ragavan 2007-07-09 03:12:55 UTC
committed to head.