Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-20478

New idea for bulk transitions of issues from different workflows

    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      I know that JRA-10693 and JRA-10699 were closed as too complex.

      What I suggest as an improvement is that once the cycle is done for one workflow that the user be returned to the BulkWorkflowTransitionDetails for the remaining bugs that they selected.

      Our users have been complaining for years about this and I agree with them that it is clunky.

        1. screenshot-1.jpg
          screenshot-1.jpg
          70 kB
        2. workflows.png
          workflows.png
          86 kB

          Form Name

            [JRASERVER-20478] New idea for bulk transitions of issues from different workflows

            Jeff Kirby added a comment -

            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.

            Jeff Kirby added a comment - 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.

            Thanks for your feedback Jeff.

            I'll pass this on to the developers when we look at bulk edits in a future release.
            In the mean time I'm closing this issue to keep our JIRA instance tidy.

            Cheers,
            Roy

            Roy Krishna (Inactive) added a comment - Thanks for your feedback Jeff. I'll pass this on to the developers when we look at bulk edits in a future release. In the mean time I'm closing this issue to keep our JIRA instance tidy. Cheers, Roy

            Jeff Kirby added a comment -

            That exact code needs a couple more checks for null in BulkWorkflowTransition.setWorkflowTransitionSelection().
            My comment remains, though, that this is easily implementable

            Jeff Kirby added a comment - That exact code needs a couple more checks for null in BulkWorkflowTransition.setWorkflowTransitionSelection(). My comment remains, though, that this is easily implementable

            Jeff Kirby added a comment - - edited

            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();
                     // Reset the selection as new selection is being made
                     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;
            

            Jeff Kirby added a comment - - edited 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(); // Reset the selection as new selection is being made 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;

              Unassigned Unassigned
              adc6ee404f6d Jeff Kirby
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: