query rally using node WS-API to search for changes between two dates - node.js

I am trying to use Rally WS-API to fetch those User stories and Features that were changed between two dates. The closest I got was getting to the Revision. But I am not sure on how to get the features and User stories from It. Thanks in advance
<pre>
==Request==
restApi.query({
type: 'Revision',
query: queryUtils.where('CreationDate', '>=',’2015-03-01’),
fetch: ['FormattedID', 'Name','Release','State','RevisionHistory','Revisions','PortfolioItem/Feature','ObjectID','VersionId'],
scope: {
workspace: 12345,
project: 54321
}
})
</pre>
<pre>
==Response==
{
_rallyAPIMajor:'2',
_rallyAPIMinor:'0',
Errors:[
],
Warnings:[
],
TotalResultCount:2,
StartIndex:1,
PageSize:2,
Results:[
{
_rallyAPIMajor:'2',
_rallyAPIMinor:'0',
_ref:'https://rally1.rallydev.com/slm/webservice/v2.0/revision/31480953333',
_refObjectUUID:'98e0ff40-34cb-494f-afc3-3cfeefdd1ce1',
_objectVersion:'1',
ObjectID:31480953333,
VersionId:'1',
RevisionHistory:{
_rallyAPIMajor:'2',
_rallyAPIMinor:'0',
_ref:'https://rally1.rallydev.com/slm/webservice/v2.0/revisionhistory/31276441234',
_refObjectUUID:'dc6978c3-9fa1-4c24-b900-01d5aedd6007',
_objectVersion:'1',
ObjectID:31276441234,
VersionId:'1',
Revisions:{
_rallyAPIMajor:'2',
_rallyAPIMinor:'0',
_ref:'https://rally1.rallydev.com/slm/webservice/v2.0/RevisionHistory/31276441234/Revisions',
_type:'Revision',
Count:7
},
_type:'RevisionHistory'
},
_type:'Revision'
},
{
_rallyAPIMajor:'2',
_rallyAPIMinor:'0',
_ref:'https://rally1.rallydev.com/slm/webservice/v2.0/revision/31484636333',
_refObjectUUID:'4b41e138-9026-46e7-ac24-94b7dd0765f8',
_objectVersion:'1',
ObjectID:31484636333,
VersionId:'1',
RevisionHistory:{
_rallyAPIMajor:'2',
_rallyAPIMinor:'0',
_ref:'https://rally1.rallydev.com/slm/webservice/v2.0/revisionhistory/31283675555',
_refObjectUUID:'1142d961-8928-4a9e-8ca1-bc6dd6df17b7',
_objectVersion:'1',
ObjectID:31283675555,
VersionId:'1',
Revisions:{
_rallyAPIMajor:'2',
_rallyAPIMinor:'0',
_ref:'https://rally1.rallydev.com/slm/webservice/v2.0/RevisionHistory/31283675555/Revisions',
_type:'Revision',
Count:4
},
_type:'RevisionHistory'
},
_type:'Revision'
}
]
}
</pre>

With Rally WSAPI, it's probably easiest to use a LastUpdateDate-bounded query:
((LastUpdateDate >= 2015-01-01T00:00Z) AND ((LastUpdateDate < 2015-03-01T00:00Z))
Rather than looking at RevisionHistories for individual artifacts.
However you would need to do a separate query for User Stories and Features, respectively.
An alternative way to accomplish this type of date-bounded change queries, especially if you are interested in a specific type of state-transition, would be to use Rally's Analytics 2.0 / Lookback API framework:
https://rally1.rallydev.com/analytics/doc/#/manual
https://www.rallydev.com/community/developer-product/analytics-20-announcing-lookback-api
I'm not sure if the Rally node toolkit has support for Lookback, but it wouldn't be too hard to extend it to do so.
There is a Java toolkit for accessing Lookback API:
https://github.com/RallyTools/Rally-Lookback-Toolkit

Related

queryText being sent to Dialogflow is not the original user query

The user input / queryText being sent to Dialogflow is not the expected, original user query.
simulator query manipulation
I enabled "Log interactions to Google Cloud" in my Dialogflow project's settings. What I'm seeing is multiple "assistant_action" resources before the actual request that goes to DF. In the example above, this is what I see:
GCP logs
With the first debug resource showing post data with:
"inputs":[{"rawInputs":[{"inputType":"UNSPECIFIED_INPUT_TYPE","query":"how long has it been on the market"}]
And
resource: {
type: "assistant_action"
labels: {
project_id: "<MY-PROJECT-ID>"
version_id: ""
action_id: ""
}
},
timestamp: "2021-03-05T18:41:44.142202856Z"
severity: "DEBUG"
labels: {
channel: "production"
querystream: "GOOGLE_USER"
source: "AOG_REQUEST_RESPONSE"
}
The subsequent requests are the same but with modified input queries ("how long has it been on the market" -> "how long has something been on the market" -> "how long has us FDA been on the market"), the last one being the actual user query sent, the channel being preview and the action_id "actions.intent.TEXT".
resource: {
type: "assistant_action"
labels: {
project_id: "<MY-PROJECT-ID>"
version_id: ""
action_id: "actions.intent.TEXT"
}
},
timestamp: "2021-03-05T18:41:45.942019959Z"
severity: "DEBUG"
labels: {
channel: "preview"
querystream: "GOOGLE_USER"
source: "AOG_REQUEST_RESPONSE"
}
I should note that I am testing current drafts of an AoG project and have no releases let alone a production release. I have a denied beta, because of branding issues which I address with separate AoG/DF projects for PROD. I do not have any intents enabled for slot filling or any required entity parameters. This is just one example, but I have been noticing many occurrences of this issue.
What is happening here? Why is the original user input being manipulated? What are all these interactions we are seeing before the expected request/response cycle?
After having contacted someone at Google Cloud, I was informed this was something that had been raised by others and that AoG devs were looking into it.
As of a Mar 24 2021 release, I can no longer replicate this Entity Resolution issue.

Alpha release 'Deployed' but unavailable

I have built a Google Action using Dialogflow and having trouble releasing an updated version to Alpha today.
The updated action works OK in Draft and I submitted it for Alpha deployment. The Actions console is showing the release as "Deployed". However, when I try to access the Alpha version I get an "isn't responding right now" response (from the simulator, Home device and Assistant smartphone app). The backend fulfilment service which is shared by Draft and Alpha is working OK.
I can see the following in the Debug console on the simulator:
{
"response": "MyAction Test isn't responding right now. Try again soon.",
"expectUserResponse": false,
"conversationToken": "EucBS2o5Uk...",
"audioResponse": "//NExAAP+H...",
"ssmlMarkList": [],
"debugInfo": {
"assistantToAgentDebug": {
"curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=XXXXX&versionId=20' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: XXXXX' -A Google-ActionsOnGoogle/1.0 -X POST -d '{\"user\":{\"accessToken\":\"eyXXXXX\",\"locale\":\"en-US\",\"lastSeen\":\"2019-09-12T09:58:03Z\",\"userStorage\":\"{\\\"data\\\":{\\\"welcomes\\\":53,\\\"intentCounts\\\":{\\\"BALANCE\\\":2}}}\",\"userVerificationStatus\":\"VERIFIED\"},\"conversation\":{\"conversationId\":\"ABXXXXXX\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"actions.intent.MAIN\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"Talk to MyAction Test\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.ACCOUNT_LINKING\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"}]},\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]}]}'",
"assistantToAgentJson": "{\"user\":{\"accessToken\":\"eyXXXXX\",\"locale\":\"en-US\",\"lastSeen\":\"2019-09-12T09:58:03Z\",\"userStorage\":\"{\\\"data\\\":{\\\"welcomes\\\":53,\\\"intentCounts\\\":{\\\"BALANCE\\\":2}}}\",\"userVerificationStatus\":\"VERIFIED\"},\"conversation\":{\"conversationId\":\"ABXXXXX\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"actions.intent.MAIN\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"Talk to MyAction Test\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.ACCOUNT_LINKING\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"}]},\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]}]}",
"delegatedRequest": {
"delegatedRequest": ""
}
},
"agentToAssistantDebug": {
"agentToAssistantJson": "<!DOCTYPE html><html lang=en><meta charset=utf-8><meta name=viewport content=\"initial-scale=1, minimum-scale=1, width=device-width\"><title>Error 400 (Not Found)!!1</title><style nonce=\"2YtDuE0THEDAcE3p1uuIgA\">*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{color:#222;text-align:unset;margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px;}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}pre{white-space:pre-wrap;}ins{color:#777;text-decoration:none}a img{border:0}#media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}#media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}#media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}</style><div id=\"af-error-container\"><a href=//www.google.com><span id=logo aria-label=Google></span></a><p><b>400.</b> <ins>That’s an error.</ins><p>The requested URL was not found on this server. <ins>That’s all we know.</ins></div>",
"delegatedResponse": {
"delegatedResponse": ""
}
},
"sharedDebugInfoList": [],
"conversationBuilderExecutionEventsList": []
},
"visualResponse": {
"visualElementsList": [
{
"displayText": {
"content": "MyAction Test isn't responding right now. Try again soon."
}
}
],
"suggestionsList": [],
"agentLogoUrl": ""
},
"clientError": 0,
"is3pResponse": true,
"clientOperationList": [
{
"operationType": 4,
"startIndicatorPayLoad": {
"status": 1
}
},
{
"operationType": 7,
"exitIndicatorPayLoad": {
"status": 1
}
}
],
"projectName": "",
"renderedHtml": ""
}
And the Stackdriver log is showing:
2019-09-12 11:56:49.381 BST App returned an HTTP error. State: URL_ERROR
{
insertId: "1iedwiug2dbgn68"
labels: {
channel: "preview"
querystream: "GOOGLE_USER"
source: "AOG_REQUEST_RESPONSE"
}
logName: "projects/myaction-test/logs/actions.googleapis.com%2Factions"
receiveTimestamp: "2019-09-12T10:56:49.389233862Z"
resource: {
labels: {…}
type: "assistant_action"
}
severity: "ERROR"
textPayload: "App returned an HTTP error. State: URL_ERROR"
timestamp: "2019-09-12T10:56:49.381445860Z"
trace: "projects/XXXXX/traces/ABXXXXX"
}
Looking at Dialogflow, the Environments / versions view shows the status of the release as "Deploying", so there seems to be a mismatch between the Action and Dialogflow deployments..?
I have tried re-releasing to Alpha (original attempt was nearly 4 hours ago), but the same problem/ errors still exist. Both attempted releases are showing as "Deploying" in Dialogflow.
Has anyone seen this before? Any idea what the problem may be or how to resolve it?
Thanks!
No solution yet but I have opened a support request with logs that have the same error.
Haven't received a support response yet but did find a workaround.
Inside of the Dialogflow agent settings > Environments and under draft I was able to view all versions. The latest version that I was looking for did say "Ready". When I clicked on the three dots to the right I loaded it to draft. Then in the Actions on Google console I went to Deploy, then the alpha section and clicked "Submit for alpha". Almost immediately after deploying and seeing "Deployed", the skill was available again for the alpha users.
Definitely don't remember doing this previously.
Finally got a response from Google who said there was an "issue" that day. Seems to be working OK now

I am using hapi-job-queue for certain cron jobs but having trouble with schedule?

From the documentation of hapi-job-queue I found that it supports the Later style time definition in schedule params. So I tried like
server.register([
{
register: require('hapi-job-queue'), options: {
connectionUrl: Config.database.url,
endpoint: '',
auth: false,
jobs: [
{
name: 'test-job',
enabled: true,
schedule: 'at 04:59 pm',
method: someMethods
}
]
}
}
]
But I think the code is not working.. if i try schedule: 'every 5 seconds'
everything works find and i even tried schedule: 'at 5:00 pm' which is a valid Later style time definition. Am i missing something?
I tried your code and it seems to work correctly. By the way you can verify the correct parsing of the timing you specified by just checking the 'Jobs' collection on the mongoDb instance you specified in
'Config.database.url'.
Look for the document having 'test-job' as _id field and check the 'nextRun' property; you should see the correct timing: '2016-08-13T16:59:00.000+0000' (in my case)

Elastic search error operation [search] and lang [groovy] is disabled?

I am using elastic search 1.7.1 and when i am trying to use script_score or script_fields it is showing the error ScriptException[scripts of type inline], operation [search] and lang [groovy] is disabled can anyone please tell me how can i remove this error. my code is given below
function_score: {
query: {
query_string: {
query: shop_search,
fields: [ 'shop_name']
}
},
functions: [
{
script_score: {
script: "_score * doc['location'].value"
}
}
]
}
Add script.engine.groovy.inline.search: on to elasticsearch.yml configuration file and restart the node.
adding script.groovy.sandbox.enabled: true to .yml works for me
For ES Version 2.x+
script.inline: on
script.indexed: on
Add
script.engine.groovy.inline.aggs: on
script.engine.groovy.inline.update: on
to elasticsearch.yml
and restart
For those with ES 2.x+
script.inline: true
script.indexed: true
Make sure you prefix the lines with a space!

Using dustjs-helpers with Kraken js

I created a project using Kraken 1.0.1 with yo kraken, with template engine dustjs, but I can not use functions dustjs-helpers.
My config.json:
"express": {
"view cache": false,
"view engine": "dust",
"views": "path:./public/templates"
},
"view engines": {
"dust": {
"module": "engine-munger",
"renderer": {
"method": "dust",
"arguments": [
{ "cache": false},
{
"views": "config:express.views",
"view engine": "config:express.view engine",
"specialization": "config:specialization",
"i18n": "config:i18n"
}
]
}
}
}
template.dust (not working helpers)
{#if cond="1<2"}
<div> x is less than y and b == c and either e or f exists in the output </div>
{:else}
<div> x is >= y </div>
{/if}
template2.dust (working)
{?messages}
{#messages}
<div data-alert class="alert-box info radius">
{.}
×
</div>
{/messages}
{/messages}
Only dusts core working, I add dustjs-helpers with npm. How add dustjs-helpers in my kraken project?
Having just fought things like this for the last two days. The problem is that dust helpers clobbers any earlier defined helpers when setting up it's own. See issue: https://github.com/linkedin/dustjs-helpers/issues/72
You can try using this repo version that derives from PR mentioned in the issue 72 thread to get around it for now.
https://github.com/patrick-steele-idem/dustjs-helpers
Or just be very sure your helpers are defined after dustjs load and dustjs-helpers is loaded.
On Kraken.js 1.0.3+ to add dust helpers in a krakenJS project you you need to decleare them in your config.json. By default KrakenJS does not include Dust.js helpers.
Find the section dedicated to dust in your config/confing.json and add "dustjs-helpers" entry to the "helpers" array. It should look like this if you have also dust-makara enabled:
"dust": {
"helpers": [
"dust-makara-helpers",
"dustjs-helpers"
]
},

Resources