This isn't really as complex as it might seem.
I was able to implement this on our Jira 3.13 after 1 day of work.
Here's what I did (I'd attach all the code, but we've hacked quite a few unrelated things).
4 changes
1. In bulkworkflowtransition_transitionmapping.jsp, change
<input type=radio name="wftransition"
id="id_<webwork:property value="/encodeWorkflowTransitionKey(.)" />"
value="<webwork:property value="/encodeWorkflowTransitionKey(.)" />"
<webwork:if test="/bulkEditBean/transitionChecked(.) == true">checked</webwork:if>/>
to
<input type=radio name="wftransition_<webwork:property value="@workflowstatus/index"/>"
id="id_<webwork:property value="/encodeWorkflowTransitionKey(.)" />"
value="<webwork:property value="/encodeWorkflowTransitionKey(.)" />"
<webwork:if test="/bulkEditBean/transitionChecked(.) == true">checked</webwork:if>/>
2. add to BulkEdit1.java
private final List<WorkflowTransitionKey> workflowKeys = new ArrayList<WorkflowTransitionKey>();
public void resetWorkflowTransitionSelection() {
...
workflowKeys.clear();
}
public void addWorkflowTransition(WorkflowTransitionKey transition) {
if(getSelectedWFTransitionKey() == null) {
setSelectedWFTransitionKey(transition);
}
else {
workflowKeys.add(transition);
}
}
public boolean hasAnotherWorkflowTransition() {
final boolean has = !workflowKeys.isEmpty();
if(has) {
setSelectedWFTransitionKey(workflowKeys.remove(0));
}
return has;
}
3. change BulkWorkflowTransition.setWorkflowTransitionSelection() to
final Map<String, String[]> params = ActionContext.getParameters();
boolean selectionMade = Boolean.valueOf(params.get("recycle")[0]);
if(!selectionMade) {
final BulkEditBean bean = getBulkEditBean();
bean.resetWorkflowTransitionSelection();
for(Map.Entry<String, String[]> entry : params.entrySet()) {
if(entry.getKey().startsWith("wftransition")) {
bean.addWorkflowTransition(decodeWorkflowTransitionKey(entry.getValue()[0]));
selectionMade = true;
}
}
}
4. In BulkWorkflowTransition.finishWizard() add
protected String finishWizard() throws Exception {
final String result;
final BulkEditBean bean = getBulkEditBean();
if(bean.hasAnotherWorkflowTransition()) {
result = getRedirect("BulkWorkflowTransitionDetailsValidation.jspa?recycle=" + true);
}
else {
clearBulkEditBean();
result=getRedirect("IssueNavigator.jspa");
}
return result;
With approval from the mother ship, I've developed and released this improvement as a free and open source plugin.
The enhancement is a part of the HP/Palm Jira Issue Move Enhancements Plugin.
With that plugin installed, you can transition all issues in a Bulk Change set. That is, in one pass of using Bulk Workflow Transition, you can transition issues through different kinds workflows at the same time.