I am getting:
Uncaught Reference Error: openCreateIssueDialog is not defined
whenever I am trying to open create issue dialog of Jira. I am using following portion of code.
AP.require('jira', function(jira){
jira.openCreateIssueDialog(function(issues){
alert(issues[0]['fields']['summary']);
} , {
pid: 10000,
issueType: 1
});
});
Try like shown in the following:
AP.jira.openCreateIssueDialog(function(issues){
alert(issues[0]['fields']['summary']);
}, {
pid: 10000,
issueType: 1,
fields : {
summary: "Hello World",
environment : "My environment",
priority : 2,
assignee: "tom",
reporter: "bob",
labels : ["Mylabel","MyOtherLabel"],
description : "My first Issue",
duedate : "11/Oct/16",
fixVersions : 10001,
versions : 10000,
components : "My component",
timetracking_originalestimate: "2w",
timetracking_remainingestimate: "3d",
worklog_activate: true,
worklog_timeLogged: "2"
}
});
Note that AP.require and AP.define are deprecated and will be removed.
From the Atlassian Connect documentation:
AP.require and AP.define are deprecated and will be removed after August 2017.
The available modules can now be called directly from AP, such as AP.request or AP.jira. No alternative will be provided for AP.define. See Migrate to Atlassian Connect JavaScript V5 for more information.
https://developer.atlassian.com/static/connect/docs/latest/concepts/javascript-api.html
Related
Issue:
I am using Prismic to send data through to my website.
In Prismic I have a Type (testimonial_list) that consists of a group of content-relation fields (Prismic Type testimonials).
To query the data on the inner Types I need to access them via the document field in graphql and use inline-fragments.
I have followed as instructed here:
https://github.com/angeloashmore/gatsby-source-prismic#Query-Content-Relation-fields
Inside graphql I have managed to navigate to the testimonial data-fields (on the document field) but the document field returns null, this is where I'm stuck. I can't work out why it would return null as the content exists and the fields are clearly being found in graphql.
Info:
My project is built using Gatsby and I'm using the plugin gatsby-source-prismic v3.1.1
Here you can see I can access the correct field data and I am getting the right number of nodes returned but document is empty:
This is the JSON for the testimonial_list Type on Prismic:
{
"Main" : {
"prismic_title" : {
"type" : "StructuredText",
"config" : {
"single" : "heading6",
"label" : "Title (only used to name entry in Prismic list)",
"placeholder" : "Prismic list title (otherwise \"undefined\")"
}
},
"page" : {
"type" : "Select",
"config" : {
"options" : [ "Homepage", "Option 2", "Option 3" ],
"label" : "Website page to appear on:"
}
},
"testimonial_list" : {
"type" : "Group",
"config" : {
"fields" : {
"testimonial" : {
"type" : "Link",
"config" : {
"select" : "document",
"customtypes" : [ "testimonial" ],
"label" : "testimonial"
}
}
},
"label" : "Testimonial List"
}
}
}
}
Thank you for any help, if there is any more info I can supply to help deduce the issue please let me know.
In the end, the issue turned out to be a typo in my gatsby-config where I was requiring the schema.
It was a daft mistake but stare at something too long and these things happen I guess.
In case anybody else has a similar issue you must ensure the property names of your Prismic schemas inside your gatsby-config are exactly the same as in Prismic.
For example if your Type in Prismic is called "my_type" then you must use that exact syntax - so for example don't use "myType".
Hey it might be something related to the gatsby-source-prismic plugin
I would directly open an issue for it here if I were you: https://github.com/angeloashmore/gatsby-source-prismic/issues
Hiting the endpoint:
https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=Hoboken%20NJ&fields=formatted_address,name&inputtype=textquery&key=xxxxxxxxxxxxxxxxxxx
Getting the result:
{
"candidates" : [
{
"formatted_address" : "New Jersey, USA",
"name" : "Hoboken"
}
],
"debug_log" : {
"line" : []
},
"status" : "OK"
}
What bugs me is that I can't find a way to separate out the region and country - Yes, I know I can parse the result myself. But is there an option I get shoot out to Google Places API to have the response separate out city/state(or region)/country in the returned JSON?
Something like:
{
"candidates" : [
{
"state" : "New Jersey",
"country" : "USA",
"name" : "Hoboken"
}
],
"debug_log" : {
"line" : []
},
"status" : "OK"
}
As far as I know, it isn't possible, you'll have to parse it. Places API is designed to search businesses and POIs at first place.
Google does have, however a geocoding API which seems to give out Postal Code, Country, State, Address, separetely.
There are also some free alternatives
I just tried working with elasticsearch and now trying to create first watcher
There are some information I have read in elasticsearch documentation : https://www.elastic.co/guide/en/x-pack/current/watcher-getting-started.html
And now I trty to create one :
https://es.origin-test.cloud.rccf.ru/apiconnect508/_xpack/watcher/watch/audit_watch
PUT method + auth headers
I put in :
{ "trigger" : {
"schedule": {
"interval": "1h"
}
}, "actions" : { "send_email" : {
"email" : {
"to" : "ext_avolkova#rencredit.ru",
"subject" : "Watcher Notification",
"body" : "{{ctx.payload.hits.total}} logs found"
} } } }
But now I see mistake :
No handler found for uri
[/apiconnect508/_xpack/watcher/watch/log_audit] and method [PUT]
Please, help me to create one simple watcher
Based on the support matrix, elasticsearch 2.x is not compatible with x-pack.
You might want to install Watcher as a separate plugin using this document.
I am trying to an app in Sinch which would act like an automated voice response menu where people could choose from a set of options and then the application could forward the call accordingly. I know Twillio has this, but I wanted to use Sinch for various reasons.
The documentation is not very complete, but it does give an IVR type example which suggests that it "might" be possible.
{
"Instructions":
[{
"name" : "PlayFiles",
"ids" : [ "welcome" ],
"locale" : "en-US"
}],
"Action":
{
"name" : "ConnectPSTN",
"number" : "+46555000111",
"maxDuration" : 600,
"locale" : "en-US",
"cli" : "+46555000222",
"suppressCallbacks" : true
}
}
but there isn't a verb (like Twillio) which can capture this response.
Has anyone out there been able to create a simple IVR using sinch?
Edit, we do support this now
Please look at https://www.sinch.com/docs/voice/rest/#runmenuaction
I am using the following Google rest API to get stock data for a given symbol SYMBOL.
https://www.google.com/ig/api?stock=<SYMBOL NAME>
But there are certain symbols like "TCS" which has multiple company names in different parts of the world.eg: TECSYS Ltd in TSE and Tata Consultancy Services iN NSE.
How do I alter the query to get the TCS data in NSE stock Exchange.
Also is there any way to get the list of available symbols from Google?
This answer is in regard to #Ashwin 's bounty:
The URL provided by #Rockstart is part of Google's deprecated Finance / iGoogle API. It's been deprecated for several years.
However, as of July 2014, there is another method that still works - though it is also part of the deprecated finance API, so it probably won't stick around forever.
The method to get a specific stock is to add the stock exchange's name to the call:
http://www.google.com/finance/info?q=NYSE:TCS
As of the time I posted this answer, this response is returned:
// [ { "id": "348018767532275" ,"t" : "TCS" ,"e" : "NYSE" ,"l" : "20.67" ,
"l_fix" : "20.67" ,"l_cur" : "20.67" ,"s": "0" ,"ltt":"4:01PM EDT" ,
"lt" : "Jul 25, 4:01PM EDT" ,"lt_dts" : "2014-07-25T16:01:16Z" ,
"c" : "-0.33" ,"c_fix" : "-0.33" ,"cp" : "-1.57" ,"cp_fix" : "-1.57" ,
"ccol" : "chr" ,"pcls_fix" : "21" } ]
Regarding the second question, you may use
https://www.google.com/finance/match?matchtype=matchall&q=tcs
to get a list of symbols with "TCS" in their name, e.g.
{
"matches": [
{
"t": "TCS",
"n": "Tata Consultancy Services Limited",
"e": "NSE",
"id": "784961"
},
{
"t": "TCS",
"n": "Container Store Group Inc",
"e": "NYSE",
"id": "348018767532275"
},
'*snip*...'
]
}
And then you may use #Andy's call to get information about a symbol in a specific exchange.