Prepare for objects that are also Collections
Don't force objects to have an id, especially since that id was incorrect. "plap/plop" would have the same id as "plop", i.e. "plop". We don't rely on the id for handling Collections anymore. Change to use more unique property names. Change the display, instead of using '*', we use '~', and there is no "Collection" header anymore. Updated formatters could use that way of showing the object is also a collection too. refs #774
This commit is contained in:
parent
f4dbefb6ef
commit
fae4470101
4 changed files with 61 additions and 48 deletions
|
|
@ -106,9 +106,9 @@ class RedmineBackend(BaseBackend, ICapContent, ICapBugTracker, ICapCollection):
|
|||
return self.iter_issues(query)
|
||||
|
||||
def validate_collection(self, objs, collection):
|
||||
if collection.level == 0:
|
||||
if collection.path_level == 0:
|
||||
return
|
||||
if Issue in objs and collection.level == 1:
|
||||
if Issue in objs and collection.path_level == 1:
|
||||
for project in self.iter_projects():
|
||||
if collection.basename == project.id:
|
||||
return Collection([project.id], project.name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue