You can clone with
HTTPS or Subversion.
Comment by pythonian4000:
As part of the move to asynchronous bug importing, we want to move this query to
the Bug model. The issue currently though is that, while we can easily obtain a
list of stale Bugs with some simple QuerySet manipulation, there is no way of
finding the code that updates them.
A solution to this is to have a ForeignKey in the Bug model that points to the
database model for the tracker that created it. This would mean that Bug objects
could be easily refreshed when stale, and then Nagios would stop complaining all
the time (until we move over to the asynchronous system and get a heap of bugs
that is!). In the case of trackers that have to be hard-coded (read: NEARLY
EVERY Bugzilla tracker ~_~ ), once the asynchronous code is set up they will be
represented by a database model as well, which just has a string pointing to the
hard-coded class. But for now, they can be a small minority not covered in this
Below is the relevant discussion from PiratePad between pythonian4000 and
I see this as being in two parts:
Comment by paulproteus:
I am running into some issues implementing this, and instead of banging my head
against it for any longer, I thought I'd ask if you could help.
The final commit in the series is the broken one. Can you give it a look? The
commit log message explains what I was trying to do.
Your patch series is all fine, except for (after applying all patches) line 554
cls(pk=self.bug_tracker_model_pk) results in an instance of the model class that
happens to have the same pk as an existing instance, rather than the actual
existing instance as you require. Of course, this isn't a problem because you
never save this instance, but there is absolutely no other data in there. Since
bot existing database tracker models have a manager named "all_trackers", the
modification to line 554 in the extra patch I uploaded fixes everything.
(On a related note, it's a very weird feeling to be on the other side of a patch
review! =D )
File at http://roundup-archive.openhatch.org/bugs/file203/fix_for_patch_0007.patch by pythonian4000
File at http://roundup-archive.openhatch.org/bugs/file202/patches.tar.gz by paulproteus
Nosy List: paulproteus, pythonian4000
Imported from roundup ID: 368 (view archived page)
Last modified: 2011-04-09.06:49:57