| |
@@ -596,16 +596,23 @@
|
| |
log.info(" Creating issue.")
|
| |
downstream = client.create_issue(**kwargs)
|
| |
|
| |
- # Add QA field if present
|
| |
- if issue.downstream.get('qa-contact', None):
|
| |
+ # Add Epic link or QA field if present
|
| |
+ if issue.downstream.get('epic-link', None) or \
|
| |
+ issue.downstream.get('qa-contact', None):
|
| |
# Fetch all fields
|
| |
all_fields = client.fields()
|
| |
# Make a map from field name -> field id
|
| |
name_map = {field['name']: field['id'] for field in all_fields}
|
| |
- # Try to get and update the custom field
|
| |
- custom_field = name_map.get('QA Contact', None)
|
| |
- if custom_field:
|
| |
- downstream.update({custom_field: issue.downstream.get('qa-contact')})
|
| |
+ if issue.downstream.get('epic-link', None):
|
| |
+ # Try to get and update the custom field
|
| |
+ custom_field = name_map.get('Epic Link', None)
|
| |
+ if custom_field:
|
| |
+ downstream.update({custom_field: issue.downstream.get('epic-link')})
|
| |
+ if issue.downstream.get('qa-contact', None):
|
| |
+ # Try to get and update the custom field
|
| |
+ custom_field = name_map.get('QA Contact', None)
|
| |
+ if custom_field:
|
| |
+ downstream.update({custom_field: issue.downstream.get('qa-contact')})
|
| |
|
| |
# Add upstream issue ID in comment if required
|
| |
if 'upstream_id' in issue.downstream.get('updates', []):
|
| |
Add support to automatically create an epic link