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

Find Users for Picker does not exclude users #250

Closed
rdohms opened this issue Feb 15, 2023 · 2 comments
Closed

Find Users for Picker does not exclude users #250

rdohms opened this issue Feb 15, 2023 · 2 comments
Assignees
Labels
bug Indicates a reported issue or malfunction that needs fixing.

Comments

@rdohms
Copy link
Contributor

rdohms commented Feb 15, 2023

I found an interesting bug that is both a JIRA issue and an issue in this library. I did not have the means to validate the internal code and how it gets there so I'm reporting this in the hopes that someone is quicker than me in doing that.

The "Find users for picker" endpoint has two options for excluding a given set of users:

  • exclude: which is now deprecated
  • excludeAccountsIds: which is not working for multiple accounts

I tested this directly on the API and found what I think explains why it does not work.
The API states This parameter accepts a comma-separated list, but I found this to be false, when providing my sample as excludeAccountsIds=id1,id2 it returned both.
However, when passing it as excludeAccountsIds=id1&excludeAccountsIds=id2 it worked as expected.
With a single Id, both scenarios work as expected.

I believe internally jira.js is doing the first scenario, or something different (was unable to debug so far), and thus it's not getting the desired results, the property is defined as.string[] in the type files.

Can anyone shed more light on how to make it do what the API expects? Trying to report this to Jira as well.
Using V3 of the API.

@MrRefactoring MrRefactoring self-assigned this Mar 5, 2023
@MrRefactoring MrRefactoring added the bug Indicates a reported issue or malfunction that needs fixing. label Mar 5, 2023
@MrRefactoring
Copy link
Owner

Hello @rdohms! Thank you for reporting, definitely, it's a jira.js bug. Let me fix this.

@MrRefactoring
Copy link
Owner

Was fixed in v2.16.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates a reported issue or malfunction that needs fixing.
Projects
None yet
Development

No branches or pull requests

2 participants