Capture all TAGS data from ADO for ADO to Oracle Use Case
search cancel

Capture all TAGS data from ADO for ADO to Oracle Use Case


Article ID: 273142


Updated On:




Use Case:
Syncing Work Item data from Azure DevOps to Custom Database(Oracle)


Release :


The issue we face is that only the first Tag from ADO will be synced to a column in the Oracle Table.
It's a limitation from API since we have this mapping with a column(varchar datatype) instead of mapping it with the same type of field like labels in Jira.


The business Script below can be used to address this specific use case.

The steps outlined in the article Add Business Script can be followed to set up the script and associate it with automation.

Execution Type = PRE_MAPVALUES

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import com.go2group.connectall.config.model.bean.*;

println "Applying Custom Business Rules Tags";

def _tags = message.payload.getValuesList("System.Tags");
def tags = []

if (_tags) {
    def tagPattern = /\[Name : (.*?)\]/
    tags = (_tags =~ tagPattern).collect { it[1].trim() }

def tagString = tags.join(', ')

message.payload.setSingleValueField("System.Tags", tagString);

return message.payload;