fix parsing comments on redmine 2.4

This commit is contained in:
Romain Bignon 2014-03-30 13:44:24 +02:00
commit f3ec952b3d

View file

@ -459,8 +459,10 @@ class IssuePage(NewIssuePage):
if m: if m:
update['author'] = (0, to_unicode(m.group(1))) update['author'] = (0, to_unicode(m.group(1)))
update['date'] = self.parse_datetime(div.xpath('.//h4//a[last()]')[0].attrib['title']) update['date'] = self.parse_datetime(div.xpath('.//h4//a[last()]')[0].attrib['title'])
if div.find('div') is not None:
comment = div.find('div') comments = div.xpath('.//div[starts-with(@id, "journal-")]')
if len(comments) > 0:
comment = comments[0]
subdiv = comment.find('div') subdiv = comment.find('div')
if subdiv is not None: if subdiv is not None:
# a subdiv which contains changes is found, move the tail text # a subdiv which contains changes is found, move the tail text