# "By Last Episode Date Added" sorting incorrectly when using labels

**URL:** https://forums.plex.tv/t/by-last-episode-date-added-sorting-incorrectly-when-using-labels/780671
**Category:** Plex Media Server
**Tags:** managed-accounts, server-windows, library-management
**Created:** [March 15, 2022, 3:22am UTC](https://forums.plex.tv/t/by-last-episode-date-added-sorting-incorrectly-when-using-labels/780671 "2022-03-15T03:22:02Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![ninjadot](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@ninjadot](https://forums.plex.tv/u/ninjadot)
#### Post date: [March 15, 2022, 3:22am UTC](https://forums.plex.tv/t/by-last-episode-date-added-sorting-incorrectly-when-using-labels/780671/1 "2022-03-15T03:22:02Z")

</div>

Server Version#: 1.25.6.5577  
Player Version#: 1.41.0.2876-e960c9ca

**The problem:** In my TV Shows Library, for all my managed users, the order of sort _“By Last Episode Date Added”_ is incorrect, regardless of the client they use (Plex for windows, Samsung TV, Web player). The problem does not affect me as the admin user, sort “By Last Episode Date Added” works correctly. I have narrowed the problem down to the use of labels. I restrict what media my managed users see using labels, however using labels breaks the _“By Last Episode Date Added”_ order.

> **I can replicate the problem logged in as the admin user**
> 
> Using no labels, _“By Last Episode Date Added”_ all 114 TV shows sort correctly:
> 
> ![plex01](https://global.discourse-cdn.com/plex/original/4X/8/1/9/81955398e18981dc1e2f7f01294bc1d565cf3d9e.jpeg)
> 
> Applying label “test” to all 114 TV shows, filtering to this label, _“By Last Episode Date Added”_ now sorts incorrectly:
> 
> ![plex02](https://global.discourse-cdn.com/plex/original/4X/3/5/3/3530f0d07b3d698e1cce6260d96fe44ff547dfbf.jpeg)

To my knowledge this problem has always existed for me and wasn’t due to an update, it’s only recently I figured out it was happening because of labels. Does anyone else also have this issue? or could it be a problem with my database? Thanks for any help you may have.

---

<div class="post-metadata">

### Author: ![Volts](https://avatars.discourse-cdn.com/v4/letter/v/a5b964/32.png) [@Volts](https://forums.plex.tv/u/Volts)
#### Post date: [March 15, 2022, 4:46am UTC](https://forums.plex.tv/t/by-last-episode-date-added-sorting-incorrectly-when-using-labels/780671/2 "2022-03-15T04:46:32Z")

</div>

That’s an interesting one!

I can’t duplicate this on 1.25.7.5604.

I agree that it shouldn’t affect the Admin, but I’m curious how you’re using the labels - as “Allow” or “Exclude” rules? Do you have multiple “Allow” and “Exclude” rules configured?

(My sympathies about _90 Day Fiance_ …)

---

<div class="post-metadata">

### Author: ![SwiftPanda16](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/swiftpanda16/32/81839_2.png) [@SwiftPanda16](https://forums.plex.tv/u/SwiftPanda16)
#### Post date: [March 15, 2022, 8:55am UTC](https://forums.plex.tv/t/by-last-episode-date-added-sorting-incorrectly-when-using-labels/780671/3 "2022-03-15T08:55:22Z")

</div>

Potentially related.

> [@TV series Smart Collection sort order](https://forums.plex.tv/t/tv-series-smart-collection-sort-order/768056/8):
>
> @tom80H I am able to confirm there is a bug with smart collection sorting using the “Last Episode Date Added” when combined with advanced filters for shared users. This bug only occurs within a smart collection of shows (i.e. query parameters type=2&sort=episode.addedAt:desc). A smart collection of episodes is sorted correctly. There must be at least one advanced filter applied. The exact filter does not matter, and any filter will produce this bug. If a shared user goes into the library and …

---

<div class="post-metadata">

### Author: ![ninjadot](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@ninjadot](https://forums.plex.tv/u/ninjadot)
#### Post date: [March 15, 2022, 2:44pm UTC](https://forums.plex.tv/t/by-last-episode-date-added-sorting-incorrectly-when-using-labels/780671/5 "2022-03-15T14:44:31Z")

</div>

> [@Volts](#):
>
> but I’m curious how you’re using the labels - as “Allow” or “Exclude” rules? Do you have multiple “Allow” and “Exclude” rules configured?

I’m using just 1 “Allow” rule for each user. So user X I allow only label “user\_x”, user Y allow only label “user\_y” etc.

Restrictions display the correct content for each user, but sort _"By Last Episode Date Added”_ has never ordered items correctly for them. If I remove the all labels/restrictions everything sorts correctly (but then a user can see everything which is not what I want).

---

<div class="post-metadata">

### Author: ![Volts](https://avatars.discourse-cdn.com/v4/letter/v/a5b964/32.png) [@Volts](https://forums.plex.tv/u/Volts)
#### Post date: [March 15, 2022, 2:47pm UTC](https://forums.plex.tv/t/by-last-episode-date-added-sorting-incorrectly-when-using-labels/780671/6 "2022-03-15T14:47:15Z")

</div>

Thanks - that’s what I was trying, though I didn’t notice the problem. Did you see @SwiftPanda16 's link? It does feel like it’s a similar issue.

---

<div class="post-metadata">

### Author: ![ninjadot](https://avatars.discourse-cdn.com/v4/letter/n/f05b48/32.png) [@ninjadot](https://forums.plex.tv/u/ninjadot)
#### Post date: [March 15, 2022, 5:11pm UTC](https://forums.plex.tv/t/by-last-episode-date-added-sorting-incorrectly-when-using-labels/780671/7 "2022-03-15T17:11:04Z")

</div>

Seems so, I can reproduce similar bug using “Network IS” advanced filter:

> ![plex05](https://global.discourse-cdn.com/plex/original/4X/d/e/d/dedb76780e726f918be6b9bb8ea9afcbaddd1741.jpeg)
> 
> ![plex06](https://global.discourse-cdn.com/plex/original/4X/6/f/d/6fd5ea56735df42b067ac5f9a0d41c904575da9d.jpeg)

Using “Label IS” advanced filter on admin account incorrect too:

> ![plex03](https://global.discourse-cdn.com/plex/original/4X/b/b/5/bb568e49daee83c50f8a6d81385ea134dfbcb0a0.jpeg)
> 
> ![plex04](https://global.discourse-cdn.com/plex/original/4X/b/9/b/b9bf20ca467e21d71d94f3f5740d95f3c2f60516.jpeg)

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)
#### Post date: [June 13, 2022, 5:11pm UTC](https://forums.plex.tv/t/by-last-episode-date-added-sorting-incorrectly-when-using-labels/780671/8 "2022-06-13T17:11:16Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
