Custom Fields Sync
Custom field sync - select type custom field to text type custom field
Demo video here: https://www.loom.com/share/5d5f10bc34dd4f2d8a16292d33beb0d6?sid=5d895067-8348-4039-9951-7af683e35aa1
or download the video file
serverfrom:
# add this section on the serverFrom
syncCustomFields: true
customFieldMapping:
mapping:
#select field textfield
customfield_10200: customfield_10202
customFieldMapping explanation
customfield_id on the left is the customfield on the sourceServer (serverFrom)
customfield_id on the right is the customfield on the targetServer (serverTo)
Notes: to prevent failure in creating or updating the synced issue
❗make sure the customfields is available for the issue and its create/update screens
❗currently only select type custom field and some system fields are supported on the source and only textfield and text area on the target
Here’s the full list of the current custom fields capabilities
sync Custom Fields
serverfrom:
# add this section on the serverFrom
syncCustomFields: true
customFieldMapping:
mapping:
#select field textfield
customfield_10200: customfield_10202
#multi select textfield
customfield_10201: customfield_10203
#cascading select textfield
customfield_10204: customfield_10300
#system field: textfield
assignee: customfield_10400
#system field: textfield
reporter: customfield_10401
#system field: textfield
duedate: customfield_10402
#system field: textfield
created: customfield_10403
currently we only support these custom field types for the source issue:
select
multi select
cascading select
textarea
number
we also support these system fields for the source issue:
assignee
reporter
duedate
created
we only support these fields for the target issue:
textfield
textarea
number
sample config will sync the
customfield(supported) values to (textfield/textarea)
assignee to custom field(textfield/textarea)
reporter to custom field(textfield/textarea)
duedate to custom field(textfield/textarea)
created to custom field(textfield/textarea)
sync Custom Fields with Default Value on Create Issue
this is a utility feature where we can add a default value for the custom fields upon issue creation
use case
during issue creation there can be scenarios that some custom fields are required
serverfrom:
...
syncCustomFields: true
customFieldMapping:
mapping:
...
mappingWithDefaultValue:
# radio button field - accepts string value
customfield_10502: 'no'
# radio button field - accepts string value
customfield_10503: 'yes'
# radio button field - accepts id of option
customfield_10504: 10301
# Text Field (Single Line) - accepts any string value
customfield_11100: 'This is the test value for custom field'
# Test Field (Multi Line) Jira setup - accepts any string value. Line breaks can be included by using two backslashes (\\). Links can also be added by using Jira format [title|http://example.com]
customfield_11202: 'This is test\\Line Break\\ [Google|https://www.google.com]'
# Date and Time Picker - accepts any string and will have the value of the current date and time as the ticket is created
customfield_11200: 'currentTime'
# Date Picker - accepts any string and will have the value of the current date as the ticket is created
customfield_11201: 'currentDate'
# Single Select field - accepts string value or accepts id of option
customfield_11400: 'Test2'
currently we only support these custom field types for the target issue to be created:
Radio Button - value supported can be the string value or the option id
Text Field (Single Line) - accepts any string value
Text Field (Multi Line) - accepts any string value and uses \ for line breaks
Date and Time Picker - current date and time as the ticket is created
Date Picker - current date as the ticket is created
Single Select - accepts any string value or the option id
sample config will sync the default values during creation of ticket
the value 'no' to customfield_10502
the value 'yes' to customfield_10503
the value of the option id (10301) to customfield_10504
the value 'This is the test value for custom field' to customfield_11100
the value 'This is test\nLine Break\n [Google|https://www.google.com]' to customfield_11200
the value '2021-10-01T09:46:00.000+0200' (X minutes ago or other text depending on when the ticket is shown will be displayed) to customfield_11202
the value '2021-10-01' (01/Oct/21) to customfield_11201
the value 'Test2' to customfield_11400