correct handling of modification after creation
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3039 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
d86dd04830
commit
67f9b7af98
1 changed files with 8 additions and 5 deletions
|
@ -132,18 +132,21 @@ class RecentChanges(TrackingStats):
|
||||||
result = []
|
result = []
|
||||||
for track in self.changeRecords:
|
for track in self.changeRecords:
|
||||||
if track.data['action'] == 'add' and track.taskId not in new:
|
if track.data['action'] == 'add' and track.taskId not in new:
|
||||||
|
sameChanged = changed.get(track.taskId)
|
||||||
|
if sameChanged and sameChanged.timeStamp < track.timeStamp + 60:
|
||||||
|
# change immediate after creation
|
||||||
|
if result[-1].taskId == track.taskId:
|
||||||
|
result.pop()
|
||||||
new[track.taskId] = track
|
new[track.taskId] = track
|
||||||
result.append(track)
|
result.append(track)
|
||||||
continue
|
continue
|
||||||
if track.data['action'] == 'modify' and track.taskId not in changed:
|
if track.data['action'] == 'modify' and track.taskId not in changed:
|
||||||
sameNew = new.get(track.taskId)
|
|
||||||
if sameNew and sameNew.timeStamp > track.timeStamp - 60:
|
|
||||||
# change immediate after creation
|
|
||||||
continue
|
|
||||||
changed[track.taskId] = track
|
changed[track.taskId] = track
|
||||||
result.append(track)
|
result.append(track)
|
||||||
continue
|
continue
|
||||||
return dict(data=[TrackDetails(self, tr) for tr in result[:length]],
|
if len(resul) > length:
|
||||||
|
break
|
||||||
|
return dict(data=[TrackDetails(self, tr) for tr in result],
|
||||||
macro=self.macros['recent_changes'])
|
macro=self.macros['recent_changes'])
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue