This is in reference to the JSON below. I am using automation to parse the description to automagically create labels. I need to replace any spaces and swap them with underscores during the label creation, as spaces obviously are not allowed in labels.
Some of the labels I want to create that come right after the ":: " in the description contain spaces, and I need to replace them with underscores in the add label portion in order for this automation to work.
Does anybody know how I should write the JSON for this to work for me?
Any help would be greatly appreciated.
Thanks!
{
"update": {
"labels": [{
"add": "{{issue.description.subStringBetween("AssetCare Application :: ",";")}}"
},
{
"add": "{{issue.description.subStringBetween("AssetCare Solution :: ",";")}}"
},
{
"add": "{{issue.description.subStringBetween("Portfolio : ",";")}}"
},
{
"add": "{{issue.description.subStringBetween("Host :: ",";")}}"
},
{
"add": "{{issue.description.subStringBetween("Asset Identifier :: ",";")}}"
},
{
"add": "{{issue.description.subStringBetween("Asset Type :: ",";")}}"
},
{
"add": "{{issue.description.subStringBetween("Alert Condition :: ",";")}}"
},
{
"add": "{{issue.description.subStringBetween("Alert State :: ",";")}}"
}
]
}
}