From d0185fc34d4d19bddb7eb3f92f4fd1b061dc404c Mon Sep 17 00:00:00 2001 From: Bohdan Iakymets Date: Oct 11 2019 11:24:11 +0000 Subject: Added ability to adding remote link to custom fields --- diff --git a/README.rst b/README.rst index 32b502d..0503fff 100644 --- a/README.rst +++ b/README.rst @@ -67,6 +67,7 @@ To set up the mailer you need to set the following environmental variables: Custom Fields ------------- Sync2Jira supports custom fields. You can pass them in as a parameter in your project ``custom-fields: {...}``. +If you need to add remote link to your custom field, you could use as value: `[remote-link]`. Development ----------- diff --git a/sync2jira/downstream.py b/sync2jira/downstream.py index 2a56563..49d9c36 100644 --- a/sync2jira/downstream.py +++ b/sync2jira/downstream.py @@ -587,7 +587,7 @@ def _create_jira_issue(client, issue, config): kwargs['components'] = [dict(name=issue.downstream['component'])] for key, custom_field in custom_fields.items(): - kwargs[key] = custom_field + kwargs[key] = custom_field.replace("[remote-link]", issue.url) # Add labels if needed if 'labels' in issue.downstream.keys():