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

GetItemsByTitle doesn't work as (at least I) expected - Items are not fetched #35

Closed
snarlysodboxer opened this issue Nov 3, 2021 · 6 comments · Fixed by #38
Closed
Assignees
Labels
bug Something isn't working

Comments

@snarlysodboxer
Copy link
Contributor

snarlysodboxer commented Nov 3, 2021

Your environment

SDK Version: v1.2.0

Connect Server Version: 1.3.1

OS: Mac OS

Go Version: go1.17.2 darwin/amd64

What happened?

If you use GetItemByTitle, you get a pointer to an Item which you can then run item.GetValue(field) against. However if you use GetItemsByTitle (plural) and loop over the results and run item.GetValue(field), you'll get empty results, because you haven't called client.GetItem(items[0].ID, items[0].Vault.ID). This makes it appear like the values don't exist when they actually do.

What did you expect to happen?

I expected to be able to loop over the results of GetItemsByTitle and run item.GetValue(field). - Or some documentation to direct me to first run GetItem on the results of GetItemsByTitle.

Steps to reproduce

Described in What Happened.

Notes & Logs

Happy to add any clarity I missed.

@snarlysodboxer snarlysodboxer added the bug Something isn't working label Nov 3, 2021
@snarlysodboxer
Copy link
Contributor Author

snarlysodboxer commented Nov 3, 2021

No idea how this got submitted, I was just starting to create it.

EDIT: Now it's filled out as more or less intended.

@snarlysodboxer snarlysodboxer changed the title GetItemsByTitle doesn't work as expected - should return list of pointers? GetItemsByTitle doesn't work as expected - Items are not fetched Nov 3, 2021
@snarlysodboxer snarlysodboxer changed the title GetItemsByTitle doesn't work as expected - Items are not fetched GetItemsByTitle doesn't work as (at least I) expected - Items are not fetched Nov 3, 2021
@jillianwilson jillianwilson self-assigned this Nov 8, 2021
@hculea hculea self-assigned this Nov 9, 2021
@hculea
Copy link
Member

hculea commented Nov 15, 2021

Hey there,

Thank you for your suggestion. I have just opened a PR(#38)that should get this fixed, let us know if this helps you.

@snarlysodboxer
Copy link
Contributor Author

It looks great! Looking forward to it.

@snarlysodboxer
Copy link
Contributor Author

Hello?

@hculea
Copy link
Member

hculea commented May 10, 2022

Hey @snarlysodboxer, terribly sorry for the late response!

@edif2008 and I spent some time today making sure #38 has no more merge conflicts and, additionally, fully working and extended tests.
We're currently gathering reviews for it, and we'll make sure to update this thread as soon as we merge and cut a new release.

Thank you for your patience and, once again, we apologize for your long wait.

Best,
Horia

@snarlysodboxer
Copy link
Contributor Author

Thanks @hculea! Appreciate your work on this. I just responded to @edif2008 here with some info that may be of interest. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants