Closed Bug 252789 Opened 21 years ago Closed 21 years ago

Empty timetrackinggroup causes error "hours worked needs to be positive" when changing bug.

Categories

(Bugzilla :: Creating/Changing Bugs, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: jpyeron, Assigned: kiko)

Details

(Keywords: regression)

Attachments

(1 file)

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322) Build Identifier: I just update to the tip timetracking group is empty new bug may be created but modifications result in a positive value required 'hours worked' must be positive error. Reproducible: Always Steps to Reproduce:
updating timetrackinggroup to editbugs resolved this issue should sanitycheck or checksetup check/fix this?
Hmm, can you be more specific about what was broken and what fixed the issue? Is this reproducible with an empty timetracking group?
yes this is reproducable with an empty time tracking group process_bug.cgi is broken. result: Positive Number Required The Hours Worked field requires a positive number. Please press Back and try again.
Oops. Yeah, you're right.
Status: UNCONFIRMED → NEW
Ever confirmed: true
This was caused as a trivial regression from bug 252159. The reason this is so easy to get wrong is that the code is @#!# confusing. I've done some reorganizing and it's now clearer and hopefully safer. Can you please test, Jason?
Assignee: myk → kiko
Status: NEW → ASSIGNED
Severity: normal → critical
Priority: -- → P2
Target Milestone: --- → Bugzilla 2.20
Attachment #154128 - Flags: review?(jouni)
Comment on attachment 154128 [details] [diff] [review] kiko_v1: fix and cleanup while we're at it Whoever gets this first wins an easter egg for 2005.
Attachment #154128 - Flags: review?(bugreport)
great that pathc fixes the multiple bugs at once issues too. (there was no workaround for multiple bugs changed at once)
Comment on attachment 154128 [details] [diff] [review] kiko_v1: fix and cleanup while we're at it >Index: process_bug.cgi >=================================================================== >- SendSQL("UNLOCK TABLES"); Note that this line never got added back. Intentional or not? >+ # AppendComment can in theory raise an error, but we've >+ # already validated the work_time here and therefore it's >+ # safe to log the entry before adding the comment. >+ LogActivityEntry($id, "work_time", "", $::FORM{'work_time'}, >+ $whoid, $timestamp); Add "(called later in the code)" after "AppendComment" to make it clear what we're talking about. r=jouni, but check out that unlock issue and explain on this bug why it's ok (or fix it). You'll be receiving my address for the easter egg soon.
Attachment #154128 - Flags: review?(jouni) → review+
(In reply to comment #8) > > >- SendSQL("UNLOCK TABLES"); > > Note that this line never got added back. Intentional or not? Well, it "lives on implicitly": ThrowUserError('comment_required', undef, "abort"); I've made the comment change locally, awaiting approval.
Flags: approval?
Comment on attachment 154128 [details] [diff] [review] kiko_v1: fix and cleanup while we're at it I'm not sure that all sites will want to prevent negative numbers (corrections), but it is an easy site hack and this just makes it cleaner.
Attachment #154128 - Flags: review?(bugreport)
Flags: approval? → approval+
Keywords: regression
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.209; previous revision: 1.208 Thanks.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Summary: hours worked needs to be positive... timetrackinggroup issue → Empty timetrackinggroup causes error "hours worked needs to be positive" when changing bug.
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: