Hi my friend,
I am solving quite easy, but quite tricky business requirement.
"If user XYZ does not do any activity for X minutes, fire an action".
As I dont have any rich filters available, have to work with default JQL, Script Runner or JMWE.
Idea was to use the Activity Stream, but as far as I am googling, there is no direct access to this component.
I ended with code like
def command = 'curl --user USERNAME:PASSWORD* "http://jira.instance.com/activity?streams=user+IS+SXVCRN7"'
def proc = command.execute()
proc.waitFor()
return "Process exit code: ${proc.exitValue()}"
//println "Std Err: ${proc.err.text}"
//return "Std Out: ${proc.in.text}"
But no luck with getting CURL response, as https will fire me up with response 35 (SSL/TLS handshake) and http ending with 28 - timeout, probably disabled at all.
We are under F5 SSO, so not much I do about that.
Is there anyone familiar with reaching Activity Stream from Script Runner?
Thanks
Use this:
def username = "Uživatel"
def password = "JehoHEslo"
def auth = "${username}:${password}".bytes.encodeBase64()
def connection = new URL( "https://mojeinstance.cz/activity")
.openConnection() as HttpURLConnection
connection.setRequestProperty("Authorization", "Basic ${auth}")
connection.setRequestProperty( 'User-Agent', 'RadimEk' )
//return connection.responseCode + ": " + connection.inputStream.text
return connection.inputStream.text
Actually this client is on Data Center, but I cannot see that option when asking question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.