Bugzilla::Object->update throws a warning if some values are undefined

RESOLVED FIXED in Bugzilla 3.2

Status

()

Bugzilla
Bugzilla-General
RESOLVED FIXED
11 years ago
8 years ago

People

(Reporter: Max Kanat-Alexander, Assigned: Max Kanat-Alexander)

Tracking

Bugzilla 3.2
Bug Flags:
approval +

Details

Attachments

(1 attachment)

(Assignee)

Description

11 years ago
Right now you can't really set anything to "undef" using Bugzilla::Object->update, because it uses string comparisons to check if things have changed. It's possible to re-write the function to accept setting things to undef, and in fact I've done it in a customization for a client, I just have to pull out the code and attach it here as a patch.
(Assignee)

Comment 1

11 years ago
Created attachment 257184 [details] [diff] [review]
v1

Okay, this applies, and I know that it worked just fine in the customizations.

I know that the if/else is weird, but that's the *only* way that I could find that actually worked. I'm pretty sure it's the only logic that works.
Assignee: general → mkanat
Status: NEW → ASSIGNED
Attachment #257184 - Flags: review?(LpSolit)

Comment 2

11 years ago
Comment on attachment 257184 [details] [diff] [review]
v1

I cannot find any better way to work around these undefined values, so r=LpSolit.
Attachment #257184 - Flags: review?(LpSolit) → review+

Updated

11 years ago
Flags: approval+
(Assignee)

Comment 3

11 years ago
Yeah, the logic is weird, but it's the only thing that works.

Checking in Bugzilla/Object.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Object.pm,v  <--  Object.pm
new revision: 1.12; previous revision: 1.11
done
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED

Updated

8 years ago
Duplicate of this bug: 379728
You need to log in before you can comment on or make changes to this bug.