Mercurial > hg > MPIWGWeb
diff MPIWGRoot.py @ 84:faaded775a8a
styles for feature and feature archive.
author | casties |
---|---|
date | Mon, 13 May 2013 22:16:04 +0200 |
parents | df56982ecb03 |
children | 77f2478ae971 |
line wrap: on
line diff
--- a/MPIWGRoot.py Mon May 13 18:06:11 2013 +0200 +++ b/MPIWGRoot.py Mon May 13 22:16:04 2013 +0200 @@ -168,6 +168,29 @@ return items + def getFeatureAuthorMap(self): + """Return a map of authors of features. + + Returns a dict with author names and a list of feature numbers. + """ + features = self.getFeatures() + authors = {} + # build dict of unique authors and features + fno = 0 + for f in features: + author = f.getAuthor() + fno += 1 + if author: + for a in author.split(';'): + a = a.strip() + if a in authors: + authors[a].append(fno) + else: + authors[a] = [fno] + + return authors + + def getDepartments(self): """returns a list of the Departments""" dir = getattr(self, 'departments', None)