Traceback (most recent call last):
File "/repos/grimoirelab-elk/grimoire_elk/elk.py", line 531, in enrich_backend
enrich_count = enrich_items(ocean_backend, enrich_backend)
File "/repos/grimoirelab-elk/grimoire_elk/elk.py", line 319, in enrich_items
total = enrich_backend.enrich_items(ocean_backend)
File "/repos/grimoirelab-elk/grimoire_elk/enriched/jira.py", line 449, in enrich_items
rich_item_comments = self.get_rich_item_comments(comments, eitem_creator)
File "/repos/grimoirelab-elk/grimoire_elk/enriched/jira.py", line 411, in get_rich_item_comments
ecomment.update(self.get_item_sh(comment, ['author', 'updateAuthor'], comment['created']))
File "/repos/grimoirelab-elk/grimoire_elk/enriched/jira.py", line 125, in get_item_sh
identity = self.get_sh_identity(item, rol)
File "/repos/grimoirelab-elk/grimoire_elk/enriched/jira.py", line 94, in get_sh_identity
user = item[identity_field]
KeyError: 'author'
After taking a look at the raw item that was failing to be enriched, turns out the comment doesn't have an author field and get_sh_identity doesn't check to see if it is present or not
command:
p2o.py --enrich --index sds-danos-jira-raw --index-enrich sds-danos-jira -e [redacted] --only-enrich --refresh-identities --no_incremental --bulk-size 500 --scroll-size 500 --db-host [redacted] --db-sortinghat [redacted] --db-user [redacted] --db-password [redacted] jira https://danosproject.atlassian.net/
This results in error
After taking a look at the raw item that was failing to be enriched, turns out the comment doesn't have an author field and
get_sh_identity
doesn't check to see if it is present or not