Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there sample code for using IssueToSubTaskConversionService? Or is there another way to convert an issue to a sub-task?

Deleted user March 2, 2015
 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Deleted user March 3, 2015

I managed to get this working. The Javadocs for IssueConversionService.convertIssue() are not quite clear.

void convertIssue(JiraServiceContext context,
    Issue issue,
    MutableIssue updatedIssue)

It turns out that the second parameter (issue) actually needs to be a MutableIssue.
Otherwise you get this ...

java.lang.UnsupportedOperationException: We don't currently index workflowid - can't get it from document
at com.atlassian.jira.issue.DocumentIssueImpl.getWorkflowId(DocumentIssueImpl.java:388)
at com.atlassian.jira.bc.subtask.conversion.DefaultIssueConversionService.convertIssueDetails(DefaultIssueConversionService.java:329)
at com.atlassian.jira.bc.subtask.conversion.DefaultIssueConversionService.convertIssue(DefaultIssueConversionService.java:392)
at com.atlassian.jira.bc.subtask.conversion.IssueConversionService$convertIssue$1.call(Unknown Source)

And both MutrableIssue objects refer to the same issue before and after the conversion.

TAGS
AUG Leaders

Atlassian Community Events