Retired User list not separating from the accounts list!!

While working on this issue,https://issues.openmrs.org/browse/RA-930. i come up with two methods that return lists of accounts.One returns the reitiredAccountList and the other the retired provider account.These methods can be seen in this pr https://github.com/openmrs/openmrs-module-adminui/pull/51 .The ticket requires me to remove this lists from the accounts list.This is also reflected in my above pr.But,after using the removeAll method,still the list of the retired users stays in the accounts list.I tested the list of retiredUsers by disabling some users and then returning there list as per the attachments on this thread.will appreciate incase of any suggestion on separting these lists. cc @dkayiwa @wyclif @mozzy @ruhanga

The first screen short shows a list of users with active user accounts

The screen short below shows the list got after retiring two users and returning a list of retired users using the getRetiredUserAccounts as per the pull request above!!

The last screen short shows the accounts list returned even after removing the getRetiredUserAccount list

@herbert24 can you give a little description on each screen shot , for us to get to know what you have done and how it was ??

well done @herbert24, have you taken a close look at the Ticket Acceptance criteria ??

1. If a person has no active (unretired) user or provider accounts their name should not appear under Manage Accounts.
2. Retired user and provider accounts should not be counted in the list under Manage Accounts.
3. There should be a button/link to "Show Retired" (or whatever the new terminology is per [<del>TRUNK-2299</del>](https://issues.openmrs.org/browse/TRUNK-2299))
4. When the "Show Retired" button is clicked, it should display the persons including those with retired accounts.
5. Similar to a * that is used to indicate provider accounts that aren't linked to person accounts, users with no active accounts could be labeled with another symbol and mentioned likewise below what it means. Or they could be in grey rather than black text. Whatever is easier.
6. When "Show Retired" has been clicked, the text should change to "Hide Retired" or something similar. When clicked it should return to the standard view, not showing retired persons/accounts.

### Extra Credit

1. In the list of accounts, when "Show Retired" is clicked, indicate the number of active and retired accounts, labeled with a symbol or in grey text. 

i cant see the buttons mentioned above

@herbert24 , can also provide description on what the last screen shot is about ??

@herbert24 but your last screen sot shows you were able to exclude the users with retired user accounts. What exactly is the problem you have ??

1 Like

i have updated this thread as above

that list is a list of the Users with retired accounts.And its the one i want to exclude from the list of accounts,that is to say,i want to get a list of accounts that doesn’t have those two retired accounts.Also,kindly check out on my pr for a better reflection of this!! cc @dkayiwa

@herbert24, according to the ticket description , i dont see it nesesary for you writing new Methods, i believe you can do everything in the appropriate gsp.

1 Like

it looks to be a nice idea let me first give it a try

@mozzy looking at this closely,it looks like i cant have a condition of separating the two lists from the gsp since the returned List is of type Account and Account is just a wrapper which contains the User and Provider Objects!