Closed Bug 300472 Opened 19 years ago Closed 6 years ago

[BUGZILLA] Display resolution AND status in bugmail notifications

Categories

(Webtools Graveyard :: Mozbot, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: LpSolit, Unassigned)

Details

Attachments

(1 file)

user@company.com set the Resolution field on bug 764512 to FIXED.

Cool! But what was the previous status (and the new one) of this bug?

If I trust the user, I don't really care, but if I have no idea who this user
is, I most of the time have to check myself what has changed. For example:

NEW/ASSIGNED to RESOLVED FIXED makes sense.
UNCONFIRMED to RESOLVED FIXED is doubtful.

That's the reason I want to know the previous status of the bug.
Severity: normal → enhancement
Summary: display resolution AND status → [BUGZILLA] Display resolution AND status in bugmail notifications
Target Milestone: --- → Mozbot 2.6
This could be accomplished by setting "reportFields" to include 'Status' on the
bot... however, due to the ordering of hashes not being guranteed - you would
get the "Bug x is a duplicate of Bug y" before you would get "User changed bug
x from New to Resolved".

To get them in the right order requires a slight modification to a couple of
functions, as detailed in the attached patch. 

I've only LIGHTLY tested this (with 3 different bug mails) and it appears to
work, but I make no gurantees of it.
Attachment #189489 - Flags: review?(mkanat)
Oh, and of course, that could be complicating things completely :D
Comment on attachment 189489 [details] [diff] [review]
Fix Order to Match Bugzilla Diff Table [checked-in]

Whoa! How about instead of this you just modify generate_log (or whatever it's
called) and delete Status from the %diffs hash and just join it up with
Resolution?
Attachment #189489 - Flags: review?(mkanat) → review-
Personally, I think having items appearing in the order they are on the diff
table is preferable to the (potential) random order of messages - regardless of
whether its useful for this bug or not.

However, I'll work on your suggestion at some point in the next few days.
You might be right. There's also the problem of -- what if somebody has both
"Status" and "Resolution" turned on in the reportFields? I guess we'll have to
think about that.

I'm just concerned about the large complexity of the changes for the very small
actual change to the behavior, as the patch stands now.
Comment on attachment 189489 [details] [diff] [review]
Fix Order to Match Bugzilla Diff Table [checked-in]

OK actually, yeah, I've changed my mind. I think it's OK to put them in order.

Of course, then we should be using an array and not a hash, but whatever.

It's not like this script has to be a work of art.
Attachment #189489 - Flags: review- → review+
I've also applied the patch to ssdbot, so we can see if anything goes wrong with it. Anyhow, feel free to carry on with the purpose of this bug. Although you may want to put things into an array instead of a hash.
Assignee: mkanat → colin.ogilvie
From what I see, this patch doesn't work.
FYI. What bzbot did:

 bzbot: bugreport@peshkin.net changed bug 282914 status from ASSIGNED to RESOLVED FIXED.

What ssdbot does:

 ssdbot: marcia@mozilla.org set the Resolution field on bug 325878 to FIXED.

Note the difference and reread comment 0.
Yeah, the attached patch doesn't actually fix the bug yet, it just makes some changes to the inbound-email script that we wanted to test.
QA Contact: kerz → mozbot
Assignee: colin.ogilvie → nobody
Comment on attachment 189489 [details] [diff] [review]
Fix Order to Match Bugzilla Diff Table [checked-in]

Checking in BotModules/BugzillaMailHandler.pl;
/cvsroot/mozilla/webtools/mozbot/BotModules/BugzillaMailHandler.pl,v  <--  Bugzi
llaMailHandler.pl
new revision: 2.9; previous revision: 2.8
done
Attachment #189489 - Attachment description: Possible Patch → Fix Order to Match Bugzilla Diff Table [checked-in]
Priority: -- → P2
Version: 2.6 → Trunk
Target Milestone: 2.6 → 2.8
Target Milestone: 2.8 → ---
Currently firebot reports:

[17:36:12]	paulc@mozilla.com changed the Status on bug 520306 from NEW to RESOLVED.
[17:36:13]	paulc@mozilla.com set the Resolution field on bug 520306 to FIXED.

Is that sufficient, or do we want to combine those two fields like comment 0 suggests?  I think firebot solves this using Colin's suggestion from comment 1, which is what I use which from comment 5, could make this INVALID or WONTFIX.

Wolf, LpSolit: What are your views?
Its spammy to have two lines reported when it could be condensed into 1.. this is a valid issue. Firebot does report both status and resolution, you are correct. When they both are changed, the lines should merge..  (into status, fwiw.)
I agree.  I also don't think that we need to worry about users who already have both the Status and Resolution field enabled.

Mozbot/Firebot is in maintenance-only mode; no further changes are planned.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: