Hi,
i want to write my own 'messages' to the issue activity stream from a groovy script. Can anybody provide an example?
Greetings, Dominik.
Community moderators have prevented the ability to post new answers.
As well as the rest API you can use the java API... here is a simple script example for adding an item to the logged in user's activity stream that I adapted from Atlassian;s tutorial:
https://gist.github.com/jechlin/dd5a9fe43f104494ea2a
Oh - that will only work in the latest version of the plugin, 3.0.
Hi Jamie, your sample works like a charm! Thanks.
In the altalssian sample the issue link gets highlighted. I've tried different urls and urlStings but the issue woun't turn into a link. Any idea on that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you talking about in this screenshot? https://developer.atlassian.com/display/DOCS/Adding+Activities+to+a+Third+Party+feed+with+the+Java+API
You can use html so you can format what's shown how you like... you can view the html in the browser to see what you need to write for a blue bg.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, like in this example. When i use the code provided on the page, my issue did not turn into a link. And the message did not appeare on the issues activity tab.
My second problem is that when i'm running into an error, nothing is display. I use
log.setLevel(org.apache.log4j.Level.DEBUG)
in my script but when calling the activity object, no messages/stack traces are displayed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you look closely at the pictures there are two items in the activity. The first one, with the link, is not from the tutorial plugin. The second one, doesn't have the link.
If you want links you can write them in html:
some(html(user.getDisplayName()+" <a href='...'>did something</a> "))
> my script but when calling the activity object, no messages/stack traces are displayed
which log are you looking in?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've seen a video 'Get in the flow with Atlassian Streams' from 2011. Near 16:50 the speaker shows how to associate the stream entry with the Issue Activity stream AND the project stream with no html. I thought this must be possible in the Java API and the REST API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie,
thanks for your script. This will add activity to the activity stream.
But my problem is that some changes are not displayed in the issue history. How can I add my changes there?
Best regards
Christof
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the rest API for streams then use something like http://groovy.codehaus.org/modules/http-builder/doc/rest.html... hope that helps you a bit
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.