Mercurial > libervia-backend
comparison src/plugins/plugin_tickets_import_bugzilla.py @ 2399:acfc481629ac
plugin tickets import bugzilla: fixed parsing of "created" and "updated" fields
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 27 Oct 2017 18:08:53 +0200 |
parents | f57a8eaec8ed |
children | 8b37a62336c3 |
comparison
equal
deleted
inserted
replaced
2398:3ff9d7a7fe71 | 2399:acfc481629ac |
---|---|
66 root = etree.parse(file_path) | 66 root = etree.parse(file_path) |
67 | 67 |
68 for bug in root.xpath('bug'): | 68 for bug in root.xpath('bug'): |
69 ticket = {} | 69 ticket = {} |
70 ticket['id'] = bug.findtext('bug_id') | 70 ticket['id'] = bug.findtext('bug_id') |
71 ticket['creation'] = bug.findtext('creation_ts') | 71 ticket['created'] = utils.date_parse(bug.findtext('creation_ts')) |
72 ticket['update'] = bug.findtext('delta_ts') | 72 ticket['updated'] = utils.date_parse(bug.findtext('delta_ts')) |
73 ticket['title'] = bug.findtext('short_desc') | 73 ticket['title'] = bug.findtext('short_desc') |
74 reporter_elt = bug.find('reporter') | 74 reporter_elt = bug.find('reporter') |
75 ticket['reporter'] = reporter_elt.get('name') | 75 ticket['reporter'] = reporter_elt.get('name') |
76 if ticket['reporter'] is None: | 76 if ticket['reporter'] is None: |
77 if '@' in reporter_elt.text: | 77 if '@' in reporter_elt.text: |