Closed Bug 372533 Opened 17 years ago Closed 17 years ago

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

Categories

(Bugzilla :: Bugzilla-General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.2

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file)

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.
Attached patch v1Splinter Review
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 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+
Flags: approval+
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
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: