Closed
Bug 349555
Opened 18 years ago
Closed 18 years ago
Move dependency validation from post_bug into Bugzilla::Bug
Categories
(Bugzilla :: Creating/Changing Bugs, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.0
People
(Reporter: mkanat, Assigned: mkanat)
References
Details
Attachments
(1 file, 1 obsolete file)
3.80 KB,
patch
|
bugzilla-mozilla
:
review+
|
Details | Diff | Splinter Review |
This is another in the series of "move validations into Bug.pm" bugs. This time it's for the "blocked" and "dependson" fields.
Assignee | ||
Comment 1•18 years ago
|
||
Okay, here it is! I've tested bug filing, and it all behaves properly. Changing bugs also still behaves properly.
Assignee: create-and-change → mkanat
Status: NEW → ASSIGNED
Attachment #234822 -
Flags: review?(bugzilla-mozilla)
Comment 2•18 years ago
|
||
Comment on attachment 234822 [details] [diff] [review] v1 >Index: Bugzilla/Bug.pm >@@ -349,6 +349,32 @@ > return [keys %keyword_ids]; > } > >+# Takes two comma/space-separated strings and returns arrayrefs >+# of valid bug IDs. >+sub _check_dependencies { >+ my ($depends_on, $blocks) = @_; >+ >+ # Only editbugs users can set dependencies on bug entry. >+ return ([], []) unless Bugzilla->user->in_group('editbugs'); >+ >+ # Make sure all the bug_ids are valid. >+ my @results; >+ foreach my $string ($depends_on, $blocks) { >+ my @array = split(/[\s,]+/, $string); Those strings can be undef: [Tue Aug 22 23:15:49 2006] [error] [client 127.0.0.1] [Tue Aug 22 23:15:49 2006] post_bug.cgi: Use of uninitialized value in split at Bugzilla/Bug.pm line 363. [Tue Aug 22 23:15:49 2006] [error] [client 127.0.0.1] [Tue Aug 22 23:15:49 2006] post_bug.cgi: Use of uninitialized value in split at Bugzilla/Bug.pm line 363. Looks good reading through it otherwise.
Attachment #234822 -
Flags: review?(bugzilla-mozilla) → review-
Assignee | ||
Comment 3•18 years ago
|
||
Okay, this handles that.
Attachment #234822 -
Attachment is obsolete: true
Attachment #234982 -
Flags: review?(bugzilla-mozilla)
Updated•18 years ago
|
Attachment #234982 -
Flags: review?(bugzilla-mozilla) → review+
Updated•18 years ago
|
Flags: approval?
Updated•18 years ago
|
Flags: approval? → approval+
Assignee | ||
Comment 4•18 years ago
|
||
Checking in post_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/post_bug.cgi,v <-- post_bug.cgi new revision: 1.168; previous revision: 1.167 done Checking in Bugzilla/Bug.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm new revision: 1.142; previous revision: 1.141 done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•