#0190 Basic dependencies handling
This is a patch to basic dependencies handling to IssueTrackerProduct. Ability to filter by dependencies in the listing filters, and dependencies graph generation is not here yet, but planned later ;)
If you feel it's too complex for "basic" users, maybe we could disable it by default and add a property on the IssueTracker to enable it, but this is a really useful feature IMHO.
6 years and 3 months and 3 weeks old
Wow! Cool. I've only just begun reading the patch and it looks quite promising so far. I'll patch it in on a dev branch and scrutinize your code.
And yes, this won't be on by default. But a great "advanced feature" for those who know what they're doing.
One thing that did catch my eye was this:
def safe_getProperty(self, property, default, where = None):
"""Try to get a property, else return default"""
try:
where = where or self
return type(default)(where.getProperty(property)) or default
except:
return default
Where did you learn that syntax? Perlschool? :) Seriously, I'd rather see a:
def get<InsertPropertyName>(self):
return self.<insertpropertyname>
...but that's secondary. To begin with I'll look at the functionality.
The idea was to factorize code, by avoiding having many functions that does the "same thing", only the name of property being different (being blocked by and blocking in my implementation is, technically, the same, just the wording and property name have to be different).
Another goal of this code was to prevent any backward compatibility problem: if the property doesn't exist, all fine, we have defaults, so need to run migration scripts (which, on our 100 trackers with some have >1000 issues takes a loooong time and sometimes even crash the zope).
But feel free to implement it in another way if you prefer