3 answers
- 10-1
Hello Ariel,
I'm trying to set default value to start with. However, i'm getting below error
def DARparent = nodeHelper.getOption(issue, "Test Found In", "Development")
issue.customFields."Test Found In".value = nodeHelper.getCascadingSelect(
DARparent,
DARparent.childOptions.find{it.value == "Feature Development"}
)
def OEMparent = nodeHelper.getOption(issue, "OEM Test Found In", "Development")
issue.customFields."OEM Test Found In".value = nodeHelper.getCascadingSelect(
OEMparent,
OEMparent.childOptions.find{it.value == "Feature Development"})
ERROR:
NullPointerException: Cannot get property 'childOptions' on null objectPlease assist.
Add your comment... - 10-1
Hi Ariel,
I'm trying sync between to projects in a single instance. Please confirm how it can be managed with above snippet.
Thanks
Add your comment... - 10-1
Hello Ariel,
We have Jira server instance and i'm trying to sync between 2 issue types within same Jira server instance. I was trying to sync between 2 cascading fields.
DAR.issue.customFields."Test Found In"?.value = OEM.issue.customFields."OEM Test Found In".value?.value
Both "Test Found In" and "OEM Test Found In" are cascading fields.
For Multi select field, I was trying to sync between 2 multi select fields
DAR.issue.customFields."Affected Programs".value = OEM.issue.customFields."OEM Affected Programs".value?.value
Both "Affected Programs" and "OEM Affected Programs" are multi select fields.
Please assist. Thanks.
- Ariel Aguilar
Hi Vimalraj,
You may want to try adding the following snippet for cascade select list for visual connection script:
if (executionInstanceName == "OEM") { // issue is from "OEM", replica is from "DAR" //In the script you may also replace the issue variable with OEM.issue and replica with DAR.issue def sourceOption1 = DAR.issue.customFields."Test Found In"?.value?.parent?.value def sourceOption2 = DAR.issue.customFields."Test Found In"?.value?.child?.value def option1 = nodeHelper.getOption( issue, "OEM Test Found In", sourceOption1 ) def option2 = option1.childOptions.find{it.value == sourceOption2} if ( option1 != null && (sourceOption2 == null || option2 != null)) { OEM.issue.customFields."OEM Test Found In"?.value = nodeHelper.getCascadingSelect( option1, option2 ) } else if (sourceOption1 == null) { OEM.issue.customFields."OEM Test Found In"?.value = null } }
If you require more information, please refer to: https://docs.idalko.com/exalate/x/bwSOAQ
Let me know if this works for you.
Kind regards,
Ariel
Add your comment...
I'm trying to sync cascading fields. I tried hard coding as below, but it did not work.
OEM.issue.customFields."OEM Test Found In"?.value = "Development"
Also, I have issues with multi select field sync. Kindly request assistance.
Hi Vimalraj,
We understand you are using a scripted or visual connection? With your piece of code, you are assigning a default value to the local custom field, in this case the value set is "Development".
Please indicate, what Jira or instances do you have? Are you trying to sync a cascade custom field with another cascade custom field? Please indicate the same for the multi select field sync question.
Kind regards,
Ariel