GetItemsByTitle doesn't work as (at least I) expected - Items are not fetched
Closed this issue · 6 comments
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.
No idea how this got submitted, I was just starting to create it.
EDIT: Now it's filled out as more or less intended.
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.
It looks great! Looking forward to it.
Hello?
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