René's URL Explorer Experiment


Title: multiple where clauses and closure issue · Issue #4 · versionone/VersionOne.SDK.JavaScript · GitHub

Open Graph Title: multiple where clauses and closure issue · Issue #4 · versionone/VersionOne.SDK.JavaScript

X Title: multiple where clauses and closure issue · Issue #4 · versionone/VersionOne.SDK.JavaScript

Description: Hi, I have been playing around with the VersionOne JS SDK for node and have a few questions. I based my code on the sample.js file provided with the SDK. What I'm trying to achieve is a query for Backlog Items where Status.Name is 'Prepa...

Open Graph Description: Hi, I have been playing around with the VersionOne JS SDK for node and have a few questions. I based my code on the sample.js file provided with the SDK. What I'm trying to achieve is a query for B...

X Description: Hi, I have been playing around with the VersionOne JS SDK for node and have a few questions. I based my code on the sample.js file provided with the SDK. What I'm trying to achieve is a query f...

Opengraph URL: https://github.com/versionone/VersionOne.SDK.JavaScript/issues/4

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"multiple where clauses and closure issue","articleBody":"Hi,\n\nI have been playing around with the VersionOne JS SDK for node and have a few questions. I based my code on the sample.js file provided with the SDK.\n\nWhat I'm trying to achieve is a query for Backlog Items where Status.Name is 'Prepared' and Scope.Name is 'My Project'\n\nSo I tried this:\n\n```\nv1.query({\n    from: \"Story\",\n    where: {\n        \"Status.Name\": \"Prepared\",\n            \"Scope.Name\": \"My Project\"\n    } // etc.\n```\n\nBut that doesn't return any results, if I take out the \"Status.Name\" or \"Scope.Name\" property then I get results, I can filter out results based on the property values after they have been returned but it seems it doesn't work when I pass the two values in the 'where' clause. Am I doing something wrong here or is this expected behavior?\n\nAlso, I think there may be a defect in the v1meta.js file (or more correctly in the v1meta.coffee file). My 'success' function is being passed the same result object for every invocation. I believe it's down to the following loop in the V1Meta.prototype.query method:\n\n```\n     for (_i = 0, _len = _ref.length; _i \u003c _len; _i++) {\n        assetxml = _ref[_i];\n        oidtoken = assetxml.get('id');\n        _ref1 = oidtoken.split(':'), found_type = _ref1[0], found_id = _ref1[1];\n        _results.push(_this.get_asset_class(found_type, function(err, Cls) {\n          var asset;\n          if (err != null) {\n            return options.error(err);\n          }\n          asset = _this.build_asset(Cls, assetxml);\n          return options.success(asset);\n        }));\n      }\n```\n\nThe assetxml value is being overwritten everytime the loop iterates, but before the get_asset_class callback is called. Closing over the assetxml variable within the loop resolves it though\n\n```\n        (function(thisAsset) {\n            _results.push(_this.get_asset_class(found_type, function(err, Cls) {\n              var asset;\n              if (err != null) {\n                return options.error(err);\n              }\n              asset = _this.build_asset(Cls, thisAsset);\n              return options.success(asset);\n            }));\n        })(assetxml);\n```\n\nI'm not really familiar enough with coffee script to make any useful contributions however.\n\nI think it would also be useful to pass all the results to the success method rather than each result individually. Or perhaps if all results are passed to a done method instead. \n\nThanks!\n\nPeter\n","author":{"url":"https://github.com/PerterB","@type":"Person","name":"PerterB"},"datePublished":"2013-12-06T14:27:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/4/VersionOne.SDK.JavaScript/issues/4"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:cfb66357-68c7-26a2-002c-e4296a2f1401
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9672:2D3E98:96CE416:C39A4E7:69762F77
html-safe-nonce499745903375367f875332b3cc7daaea0703c092f725de0260db0e4b5e7b9c63
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjcyOjJEM0U5ODo5NkNFNDE2OkMzOUE0RTc6Njk3NjJGNzciLCJ2aXNpdG9yX2lkIjoiMTk5ODQyMTkzNDk3Mzc5MjExOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac107fe393e4cd4e7ab0e688765082023ed52867a0ef940385a2f982f6b183f0c1
hovercard-subject-tagissue:23860943
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/versionone/VersionOne.SDK.JavaScript/4/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d710988cdfe01e213436a1a40317e380f0eb558d620a62c0238e59c8389df63a/versionone/VersionOne.SDK.JavaScript/issues/4
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d710988cdfe01e213436a1a40317e380f0eb558d620a62c0238e59c8389df63a/versionone/VersionOne.SDK.JavaScript/issues/4
og:image:altHi, I have been playing around with the VersionOne JS SDK for node and have a few questions. I based my code on the sample.js file provided with the SDK. What I'm trying to achieve is a query for B...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamePerterB
hostnamegithub.com
expected-hostnamegithub.com
Nonec6814b4cc7afd45cd6e64525d0cff0e76dd802f315a5b0e55a7abda1d1d070d0
turbo-cache-controlno-preview
go-importgithub.com/versionone/VersionOne.SDK.JavaScript git https://github.com/versionone/VersionOne.SDK.JavaScript.git
octolytics-dimension-user_id256040
octolytics-dimension-user_loginversionone
octolytics-dimension-repository_id4371929
octolytics-dimension-repository_nwoversionone/VersionOne.SDK.JavaScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id4371929
octolytics-dimension-repository_network_root_nwoversionone/VersionOne.SDK.JavaScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4ea235bfed58ef16c8a5642b3ac64b74f10c9f52
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/issues/4#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fversionone%2FVersionOne.SDK.JavaScript%2Fissues%2F4
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fversionone%2FVersionOne.SDK.JavaScript%2Fissues%2F4
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=versionone%2FVersionOne.SDK.JavaScript
Reloadhttps://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/issues/4
Reloadhttps://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/issues/4
Reloadhttps://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/issues/4
versionone https://patch-diff.githubusercontent.com/versionone
VersionOne.SDK.JavaScripthttps://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fversionone%2FVersionOne.SDK.JavaScript
Fork 6 https://patch-diff.githubusercontent.com/login?return_to=%2Fversionone%2FVersionOne.SDK.JavaScript
Star 12 https://patch-diff.githubusercontent.com/login?return_to=%2Fversionone%2FVersionOne.SDK.JavaScript
Code https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript
Issues 10 https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/issues
Pull requests 1 https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/pulls
Actions https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/actions
Projects 0 https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/projects
Wiki https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/wiki
Security 0 https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/security
Insights https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/pulse
Code https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript
Issues https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/issues
Pull requests https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/pulls
Actions https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/actions
Projects https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/projects
Wiki https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/wiki
Security https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/security
Insights https://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/versionone/VersionOne.SDK.JavaScript/issues/4
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/versionone/VersionOne.SDK.JavaScript/issues/4
multiple where clauses and closure issuehttps://patch-diff.githubusercontent.com/versionone/VersionOne.SDK.JavaScript/issues/4#top
https://github.com/PerterB
https://github.com/PerterB
PerterBhttps://github.com/PerterB
on Dec 6, 2013https://github.com/versionone/VersionOne.SDK.JavaScript/issues/4#issue-23860943
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.