# Bug in changing post ownership

**URL:** <https://meta.discourse.org/t/bug-in-changing-post-ownership/70873>\
**Category:** Bug\
**Created:** [27 Settembre 2017, 2:31pm UTC](https://meta.discourse.org/t/bug-in-changing-post-ownership/70873 "2017-09-27T14:31:54Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)\
**Post date:** [27 Settembre 2017, 2:57pm UTC](https://meta.discourse.org/t/bug-in-changing-post-ownership/70873/3 "2017-09-27T14:57:12Z")

</div>

> <https://github.com/discourse/discourse/blob/0fca5ed533a123d75c45c84375199ac2079c9ca3/app/assets/javascripts/discourse/controllers/topic.js.es6#L682-L685>

I wonder whether `selectedPosts` should get cleared if the `Change Ownership` dialog is dismissed?

As it stands right now, it keeps adding into the list.

`SelectedPostsCount` assumes that all the `selectedPosts` all have the same `user`; if not, it chokes and show the above error for missing `old_user`.

---

_[View the full topic](https://meta.discourse.org/t/bug-in-changing-post-ownership/70873)._
