Hello Team,
We are trying to create test case with Version Picker [ Single Version] using Importer.
Let me explain you with the screenshot.
Step 1. Create the versions .
Step 2- We try to import below file.
Step 3 - We match the fields
Step 4- We try to import, below are the findings when we try to import
Step 5- Since entry.getValue() is of type SingleValueMap
else if(customFieldType instanceof VersionCFType){
issueInputParameters.addCustomFieldValue(entry.getKey(), "v1");
}
else {
issueInputParameters.addCustomFieldValue(entry.getKey(),((IssueImporterServiceImpl.SingleValueMap)entry.getValue()).getValue());
}
I have specifically written for type VersionCFType and even tried to hardcode with issueInputParameters.addCustomFieldValue(entry.getKey(), “v1”);
since ((IssueImporterServiceImpl.SingleValueMap)entry.getValue()).getValue()); was not working.
Still it throws error like this
Please help, how to get the value of it so that it works.
Internally when i debugged inside atlassian own class , it fails after validateCreateIssueFields()
this.issueCreationHelperBean.validateCreateIssueFields(new JiraServiceContextImpl(user, errorCollection), providedFields, issue, fieldScreenRenderer, new OperationContextImpl(IssueOperations.CREATE_ISSUE_OPERATION, fieldValuesHolder), issueInputParameters, i18n);
if (!errorCollection.hasAnyErrors()) {
this.issueCreationHelperBean.updateIssueFromFieldValuesHolder(fieldScreenRenderer, issue, fieldValuesHolder);
}
Please help how to handle this case. It will be of great help for us.