Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plex - [list] Users that watch the show/season/episode comparison fails when comparing to a list. #1456

Closed
themarkwilliams opened this issue Dec 23, 2024 · 6 comments

Comments

@themarkwilliams
Copy link

Describe the bug
Evaluation of "Using Plex - [list] Users that watch the show/season/episode" equal to a list is incorrect when more than one value is in the second value list.

To Reproduce
Rule conditions:
Operator: Or
First Value: Plex -[list] Users that watch show/season/episode
Action: Equals
Second Value: Text
Custom Value: ["user1", "user2"]

Expected behavior
Both users should appear in the results from First Value Result. i.e. ["user1","user2"] for it to evaluate to true. Currently, if one appears in the the First Value results, it will evaluate to true.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Device (please complete the following information):

  • OS: Ubuntu
  • Version 2.4

Additional context
Test media results:
- operator: OR
action: equals
firstValueName: Plex - [list] Users that watch the show/season/episode
firstValue:
- user1
secondValueName: text
secondValue:
- user1
- user2
result: true

Using Contains (Exact list match) as the action yields the same results.

@benscobie
Copy link
Collaborator

This is the correct behavior, see the docs: https://docs.maintainerr.info/Rules/#list-examples

If you'd like another operator that does what you describe, raise a feature request here: https://features.maintainerr.info/

@benscobie benscobie closed this as not planned Won't fix, can't repro, duplicate, stale Dec 23, 2024
@themarkwilliams
Copy link
Author

Apologies for a follow up, but I'm not tracking.

If I'm doing an equals comparison, and firstValue doesn't equal secondValue, how is that not a bug?

Why does this example in your list documentation evaluate to true when first value is not an exact match of secondValue?
image

If the operator were equals in that example, the result should be false.

Or what am I missing?

@ydkmlt84
Copy link
Collaborator

If you want to come on over to the Discord I can try to help you understand.

@benscobie
Copy link
Collaborator

benscobie commented Dec 23, 2024

Or what am I missing?

It's an exact string match of ANY item in your list, not all of the provided list values. AND vs OR. The order does not matter.

You could add another rule to match the second value in your list.

When we add the logic you want we should come up with some better descriptions for sure.

@themarkwilliams
Copy link
Author

Got it. Any, not All for the Contains (Exact).

Should there be a behavior difference for Equals vs Contains (Exact)?

I'll try the additional, separate rule as a workaround for the multiple checks.

The All comparison would be very nice to have and I agree there is an opportunity to clarify the descriptions.

Thanks for the help!

@benscobie
Copy link
Collaborator

Should there be a behavior difference for Equals vs Contains (Exact)?

For arrays, equals checks that every element in firstValue is in the secondValue array (case insensitive). It's not a perfect equals, as the secondValue array could contain a value not within firstValue and it would pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants