Closed Bug 385379 Opened 17 years ago Closed 17 years ago

Move dependency DB updating from process_bug into Bugzilla::Bug

Categories

(Bugzilla :: Creating/Changing Bugs, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.2

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(2 files, 1 obsolete file)

After keywords and CCs, the next thing that I can move into the DB is dependencies.
Attached patch v1 (obsolete) — Splinter Review
Okay, here we go! This applies against the keywords patch. I've tested it and it works fine, and this is a LOT cleaner than the old code.

Believe it or not, this code really does to everything that the old code did. It also never checks dependencies for changes if they don't need to be notified (which is an improvement over the old code that would always check dependencies, in certain cases, even if they didn't need to be notified).
Attachment #269301 - Flags: review?(LpSolit)
Depends on: 384664
Attached patch v1.1Splinter Review
Fixed some minor bitrot.
Attachment #269301 - Attachment is obsolete: true
Attachment #269768 - Flags: review?(LpSolit)
Attachment #269301 - Flags: review?(LpSolit)
Comment on attachment 269768 [details] [diff] [review]
v1.1

>diff -u Bugzilla/Bug.pm Bugzilla/Bug.pm

>+sub update_dependencies {

Nit: please cleanup all these lines containing whitespaces only.


>+sub set_dependencies {

>+    trick_taint($_) foreach (@$dependson, @$blocked);

AFAICS, these values are already detained by ValidateBugID(), so calling trick_taint() here is useless (and it would even be detaint_natural() as ValidateBugID converts aliases to bug IDs). I suggest you remove this line to make clear where the validation occurs.

Your patch seems to work correctly. r=LpSolit
Attachment #269768 - Flags: review?(LpSolit) → review+
Flags: approval+
Okay, all done! I wasn't sure what you meant about the whitespace lines. There were some line breaks in that subroutine, but they were there on purpose, for the most part.

Instead of removing the trick_taint, I added a comment explaining why it's there, and made it a detaint_natural.

Checking in process_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v  <--  process_bug.cgi
new revision: 1.372; previous revision: 1.371
done
Checking in Bugzilla/Bug.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v  <--  Bug.pm
new revision: 1.186; previous revision: 1.185
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Attached patch fixing bustageSplinter Review
The 'list_comparison_error' error tag is no longer used, which makes |runtests.pl 12| to fail. I'm applying this patch to fix bustage.
Tinderbox should be happy now.

Checking in template/en/default/global/code-error.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/code-error.html.tmpl,v  <--  code-error.html.tmpl
new revision: 1.98; previous revision: 1.97
done
Blocks: 387705
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: