To begin with, I am not even able to assign any value to the destination side.
The use case is that we have fixVersion ‘mandatory’ on the destination side, but it might not be available in the origin. Text issue type is not accepted by the groovy code during execution as ‘fix version’ is of ‘version’ type.
The solutions suggested are for cases when data type on both ‘issue’ and ‘replica’ are of same ‘version’ type. Our usecase is to transfer version as ‘text’ datatype to ‘version’ datatype on other side.
In our case, we have version mentioned as ‘text’ issue type in ‘issue’.‘version’, while the mapped field is of '‘version’ issue type in ‘replica’.‘version’. We tried creating a new version using the text value, but it’s not working.
It is a case where we want to create ‘version’ using ‘text’ values from incoming sync.
Regards,
Shyam.
Comments:
André Leroy-Beaulieu Castro commented on 10 February 2021
Hi Shyam,
Understood, in that case, if you want the text value from the source side as the version name in the destination side, you can pass the value of the sending side as the second parameter of the createVersion method, for example if the sending side is a custom field called “Version”, you could do the following, the only thing is that there is a third parameter “description” that will need to have a default value so that the method works:
Outgoing Sync Source Side:
//Assuming the text version in this side is a custom field..
replica.customFields."Version" = issue.customFields."Version"