How to sync multiselect type field in scripted mode in jira server

Originally asked by Moogambigai G R on 01 February 2022 (original question)


Hi Team,

We have a scripted connection for project A and Project B in one instance and below are the configuration.

Outgoing:

if (issue.project.key == "DAR" && issue.typeName == "Defect"){

replica.customFields."10806" = issue.customFields."10806" //Accoutable Team//OEM Accountable Team}

Incoming:

if(replica.project.key == "DAR" && replica.type.name == "Defect") //sync A -> B  
{  
issue.projectKey   = "OEM"  
  
def issueTypeMapping = ["Defect" : "Acquired Product Defect"]

issue.typeName = issueTypeMapping[replica.type?.name] ?: "Acquired Product Defect"

if (issue.projectKey == "OEM")
{
def aTeam = replica."10134"?.value
if ((aTeam != "Alexandra") && (aTeam != "Canyon")&&(aTeam != "Carroll") && (aTeam != "Carroll-Ref")&& (aTeam != "Melody")&& (aTeam != "Mystic"))
{
issue.customFields."17003"?.value = "Alexandra"
}
else{
issue.customFields."17003".value = replica.customFields."10134".value
}}

We have Multi List type field and some values only matching in both sides, Need a functionality like if any of the not present values in project B field is selected in Project A while syncing A->B default value to be set.

Example

Project A ->Have “Alder” value

Project B → Not have “Alder” Value

If I synced A->B --->I have to set default value, if value is not present otherwise it will set the same value as A in B Project.

Regards,

Moogambigai G R


Comments:

Moogambigai G R commented on 03 February 2022

Hi there,

Is there any update on my question?

Regards,

Moogambigai G R

Moogambigai G R commented on 15 February 2022

Hi there,

Is there any update on my question?

Regards,

Moogambigai G R

Moogambigai G R commented on 23 February 2022

Hi there,

Is there any update on my question?

Regards,

Moogambigai G R

Moogambigai G R commented on 18 March 2022

Hi there,

Is there any update on my question?

Regards,

Moogambigai G R

Moogambigai G R commented on 19 May 2022

Team,

Is there any update?

Regards,

Moogambigai G R