# Order is not respected on back button when admin user list is re-ordered

**URL:** https://meta.discourse.org/t/order-is-not-respected-on-back-button-when-admin-user-list-is-re-ordered/70701
**Category:** UX
**Tags:** pr-welcome
**Created:** [25.Сентябрь.2017 06:12:25 UTC](https://meta.discourse.org/t/order-is-not-respected-on-back-button-when-admin-user-list-is-re-ordered/70701 "2017-09-25T06:12:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [25.Сентябрь.2017 06:12:25 UTC](https://meta.discourse.org/t/order-is-not-respected-on-back-button-when-admin-user-list-is-re-ordered/70701/1 "2017-09-25T06:12:25Z")

</div>

This is a minor ux bug:

1. Visit admin/users
2. re-order list by topics viewed
3. Click badges
4. Click back

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/0/b006cad90784c13d0e19b4cf3e0001aab5506700.png)

Second minor bug

1. Visit admin/users
2. re-order list by topics viewed
3. Click badges
4. Click “users”

Same reordering bug shows up, topics viewed is incorrectly selected.

---

<div class="post-metadata">

### Author: ![saurabhp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saurabhp/32/125182_2.png) [@saurabhp](https://meta.discourse.org/u/saurabhp)
#### Post date: [31.Декабрь.2018 09:50:55 UTC](https://meta.discourse.org/t/order-is-not-respected-on-back-button-when-admin-user-list-is-re-ordered/70701/2 "2018-12-31T09:50:55Z")

</div>

Hi,  
I was able to find out where the issue is. When we load users we fetch users using this:  
[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/admin/routes/admin-users-list-show.js.es6#L6](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/admin/routes/admin-users-list-show.js.es6#L6)

Here, we don’t pass the parameter of order(topic\_viewed etc) and ascending to findAll function.

But on the first load(refresh), this function gets called by callback:

> <https://github.com/discourse/discourse/blob/1381dc603d4dcad3c2ac6e12488692241fcbc79d/app/assets/javascripts/admin/controllers/admin-users-list-show.js.es6#L51>

which again fetches users with order and ascending values.

When we go to badges and come back, this function doesn’t get called by any callback. Can anyone explain to me why?  
I don’t want to change the first file to pass ascending and order from params to findAll since it will affect others using that class.

I m new to Ember 🙇‍♂️ Is there any other better way to solve this issue?

Thanks
