jorenn92 / Maintainerr

Looks and smells like Overseerr, does the opposite. Maintenance tool for the Plex ecosystem
https://maintainerr.info
MIT License
793 stars 14 forks source link

Overseerr - Requested by user (Plex or local username) using null instead of user name #995

Closed vitorcsbrito closed 5 months ago

vitorcsbrito commented 6 months ago

Describe the bug When implementing a rule with the filtering by overseerr user username the firstValue used for comparison is "null" instead of the actual username making the rule always fail

To Reproduce Steps to reproduce the behavior:

  1. Request movie on overseerr

  2. Implement rule like so:

    mediaType: MOVIES
    rules:
    - "0":
      - firstValue: Overseerr.addUser
        action: EQUALS
        customValue:
          type: text
          value: <username>
  3. Test rule in collection viewer

  4. Observe that result is false

    - plexId: <plexid>
    result: false
    sectionResults:
    - id: 0
      result: false
      ruleResults:
        - operator: OR
          action: equals
          firstValueName: Overseerr - Requested by user (Plex or local username)
          firstValue:
            - null
          secondValueName: text
          secondValue: <username>
          result: false

Expected behavior Rule should use actual username and provide correct filtering like so:

- plexId: <plexid>
  result: true
  sectionResults:
    - id: 0
      result: true
      ruleResults:
        - operator: OR
          action: equals
          firstValueName: Overseerr - Requested by user (Plex or local username)
          firstValue:
            - <username>
          secondValueName: text
          secondValue: <username>
          result: true

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

Device (please complete the following information):

Additional context Add any other context about the problem here.

RaunoT commented 6 months ago

Running into the same issue in 2.0.3

Manny8787 commented 5 months ago

I have the same sort of issue, instead the first value is coming back with my Admin account name.

jorenn92 commented 5 months ago

Is this the initial rule in the first section? If so, it seems the issue isn't directly linked to the rule itself but rather to an error during rule creation. The very first rule shouldn't contain an operator, and if it does, it will cause the rule to malfunction.

If this is indeed the scenario, I recommend exporting your rule, removing the operator from the first rule of the first section, and then re-importing the rule. This should resolve the issue.

Edit: i pushed a fix for the above scenario in https://github.com/jorenn92/Maintainerr/pull/1070.