Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-7124

Cannot remove issue from Sprint on Work Mode unless Plan Mode is loaded first

      To reproduce this issue:

      • Go to a Rapid Board in Work mode;
      • Reload the page;
      • Select an issue;
      • Click the cog, then Remove issue from sprint;
      An error occurredHide...
      Please try refreshing the page, or contact your administrator / Atlassian Support if the problem continues.
      Details
      Exception: Uncaught TypeError: Object false has no method 'getIssueCount'
      Resource: https://xxx.xxx.xxx/s/en_US-9dpztf-418945332/813/70/c1d455f6e83b53cab8bab98e054ad8fa/_/download/contextbatch/js/gh-rapid/batch.js
      Line: 1372
      Environment
      Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17
      

      This is broken on this line in RemoveIssuesFromSprintDialog.js:
      var issuesInSprintCount = GH.BacklogModel.getIssueListForSprint(sprint.id).getIssueCount();

      The issue lists in backlogmodel are only loaded when plan mode loads. We don't have issues by sprint data in the request for the board in Work mode.

      We use the count of issues in sprint to check whether this is the last issue in the sprint, in which case removing it causes the sprint to close.

      Solution

      Move the check to the server side, check if removing issue will cause sprint to be closed, display message and ask user to confirm as we do now.

      Original Description

      Tried "remove from sprint" on this issue:

      https://jdog.atlassian.net/secure/RapidBoard.jspa?rapidView=186&view=detail&selectedIssue=JRADEV-16674

      The first time I got an error dialog saying "cannot find issue"
      Now I get no feedback whatsoever, but the issue is not removed

      Workaround

      • Go in Plan Mode >> Click on the issue ID >> Remove the issue;
      • Go to Work Mode >> Remove the issue (problem happens) >> Go to Plan Mode and back to Work Mode >> Remove the issue;

        1. cant_remove_story.jpg
          cant_remove_story.jpg
          69 kB
        2. work.png
          work.png
          42 kB

          Form Name

            [JSWSERVER-7124] Cannot remove issue from Sprint on Work Mode unless Plan Mode is loaded first

            Refactored following code review, please retest

            JoanneA (Inactive) added a comment - Refactored following code review, please retest

            On branch GHS-7124-remove-issue-from-sprint

            The check is now server side as per the solution in the description. Please test on plan/work mode with removing single or multiple issues and different issue types.

            JoanneA (Inactive) added a comment - On branch GHS-7124 -remove-issue-from-sprint The check is now server side as per the solution in the description. Please test on plan/work mode with removing single or multiple issues and different issue types.

            Exception: Uncaught TypeError: Object false has no method 'getIssueCount'
            Resource: https://jdog.atlassian.net/s/en_USgxklzi-418945332/6020/1194/58708bcf6117c13664c5ef71dd1d9f26/_/download/contextbatch/js/gh-rapid/batch.js
            Line: 1372

            Peter Obara added a comment - Exception: Uncaught TypeError: Object false has no method 'getIssueCount' Resource: https://jdog.atlassian.net/s/en_USgxklzi-418945332/6020/1194/58708bcf6117c13664c5ef71dd1d9f26/_/download/contextbatch/js/gh-rapid/batch.js Line: 1372

            https://jdog.atlassian.net/secure/RapidBoard.jspa?rapidView=186&view=detail&selectedIssue=JRADEV-17971

            I can't remove that issue. I get the following error (see attachment):

            Bryan Rollins added a comment - https://jdog.atlassian.net/secure/RapidBoard.jspa?rapidView=186&view=detail&selectedIssue=JRADEV-17971 I can't remove that issue. I get the following error (see attachment):

            Let me see if I can reproduce it with another issue. That sprint ended so it moved on to the next sprint.

            Bryan Rollins added a comment - Let me see if I can reproduce it with another issue. That sprint ended so it moved on to the next sprint.

            brollins the issue you mentioned is no longer visible on the board. Did you eventually remove it from the sprint? Is there another issue we can try to remove?

            Peter Obara added a comment - brollins the issue you mentioned is no longer visible on the board. Did you eventually remove it from the sprint? Is there another issue we can try to remove?

              Unassigned Unassigned
              brollins Bryan Rollins
              Affected customers:
              5 This affects my team
              Watchers:
              21 Start watching this issue

                Created:
                Updated:
                Resolved: