# Bug AGILE-98 - Backlogs: Story drag and drop does not handle errors properly

Project: Stream agile
Status: closed
URL: https://community.openproject.org/work_packages/AGILE-98

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Backlogs, Frontend components and Primer design system |
| Target versions | 17.2.0 |
| Observed in versions | 17.2.0 |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) | 17.2.x |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Alexander Coles |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Effort (shirt size) |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce (QA - in browser - theoretical, but hard to reproduce)

1.  Login and open a project/Backlogs module
    
2.  Make sure you have several versions and work packages
    
3.  Try to drag and drop one of the stories from one version to another
    
4.  _An unexpected error happens for some reason_
    

### Steps to reproduce (devs - in code)

*   Test against `dev` - 2c0d82bfa34125dade74cb7caa2c13a302fbd5c1 - with new Agile Sprint feature flag enabled.
    
*   Change `rb_stories_controller.rb` to:
    

```ruby
    unless false
      render_error_flash_message_via_turbo_stream(
        message: I18n.t(:notice_unsuccessful_update_with_reason, reason: call.message)
      )
      return respond_with_turbo_streams(status: :unprocessable_entity)
    end
```

### What is the buggy behavior?

*   The user may be shown both a success and error message on error.
    
*   The item stays dropped in the new location and is not moved back to its original backlog.
    

### What is the expected behavior?

*   On success only a success &nbsp;message  should be shown.
    
*   On failure only a failure message should be shown.
    
*   The item should be moved back to its original location if the move was unsuccessful.
    

### Screenshots and other files

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/919598/content">

### Environment information

**OpenProject installation type**

*   Hosted cloud edition
    

**OpenProject version**

_dev_

**Browser**

*   [x] Chrome
*   [ ] Firefox
*   [ ] Safari
*   [ ] Mobile Safari
*   [ ] Other (please specify)

**Operating System**

*   [ ] Windows
*   [x] Mac OS X
*   [ ] Mobile iOS
*   [ ] Mobile Android
*   [ ] Linux (please specify distro)
*   [ ] Chrome OS
*   [ ] Other (please specify)

**Language**

_en\_GB_
