Concat multiple fields from ADO to one field in Jira using ConnectALL Business Script
search cancel

Concat multiple fields from ADO to one field in Jira using ConnectALL Business Script

book

Article ID: 369560

calendar_today

Updated On:

Products

ConnectALL

Issue/Introduction

Use Case:

Customer wants to concat Description, Repro Steps and System Info from ADO in one field(Description) on Jira

Environment

2.11.x to 3.x

Cause

NA

Resolution

Below Business Script can take care of this use case.
The steps outlined in the Article can be followed to set up the Business logic for this use case. Below is the groovy script that can help you achieve this.

Execution Type = PRE_MAPVALUE
 
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import com.go2group.connectall.config.model.bean.*;
 
println "Applying Custom Business Rules Combine(Issue Description + Repro Steps + System)";
 
def description = message.payload.getSingleValueField("Custom.IssueDescription");
def reproSteps = message.payload.getSingleValueField("Microsoft.VSTS.TCM.ReproSteps");
def systemInfo = message.payload.getSingleValueField("Microsoft.VSTS.TCM.SystemInfo");
 
concat = "Issue Description : " + description + "\n" + "Repro Steps : " + reproSteps + "\n" + "System Info : " + systemInfo;
message.payload.setSingleValueField("Custom.IssueDescription", concat);
return message.payload;

Additional Information

Disclaimer:

The scripts provided are intended to assist with specific business problems and are offered "as-is." While we strive to ensure these scripts are helpful, they are provided without any warranty, express or implied. Use of these scripts is at your own risk. We do not provide support, updates, or guarantee their performance or suitability for your specific needs. Always test the scripts in a safe environment before deployment.