Hi,
I,m writing a groovy script for creating an issue "Target_Issue" in a project "Target_Project" based on an issue "Source_Issue" from another proyect "Source_Proyect".
There are some customfields that exists in "Source_Proyect" but not in "Target_Project".
My steps:
- To clone the "Target_Issue" using:
MutableIssue newMutableIssue = issueFactory.cloneIssue(myIssue);
- Reset some fields that don't must be set in "Target_Issue" using:
newMutableIssue.setCustomFieldValue(customFieldXXX, null);
- Populate some fields that "should" exists in "Target_Issue" using:
newMutableIssue.setCustomFieldValue(customFieldXXX, value);
Because the groovy script must woks for different pairs <"Target_Project" ,"Source_Proyect"> before reset and populate fields in "Target_Issue" I need to test if the customfield to be reset/populate exists in this issue.
How can I do that?
Thanks in advance
Begoña