You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.