Can anyone point me to materials or examples of how to append a text string to the history of an issue using ScriptRunner/Groovy. I believe that this would be as a Behaviour, not a Listener or Post action.
I've spent days in Google Search looking for examples and all I've come away with is don't use the ComponentManager in favor of the ComponentAccessor.
Jira v8.0.2 / ScriptRunner v5.5.7.1
Thank you.
When do you wish for this to happen, and what exactly do you mean by the history - perhaps a comment?
On an Issue page, down under Activity, there are the following "tabs": All, Comments, Work Log, History, Activity, CI Builds.
The History tab seems to be keeping track of activities that are lower level than humans posting comments on an issue.
That's the History I was referring to.
What we'd like is that when we perform an action in ScriptRunner (for example, moving an issue from one status to another automatically) that our script would add something to the History documenting the source of that change.
Did that answer your question?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We do something similar - using a post function we selectively transition an issue programmatically, and when we do, that shows in the issue history. Are you not getting this, or perhaps this isn't quite what you're doing?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I didn't want to assume that it was there.
Now I will. I'll assume that post functions that change something in an issue adds something to the History.
Thank you, Payne.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
However...
What if it's happening in a ScriptRunner Groovy script as a Behaviour? If the script changes something in an issue, will that always appear in the History?
If not, any suggestions on how to write something to the history?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes; EVERY change (except comments and changes to comments) SHOULD be recorded in the History tab.
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.
The way we use Behaviours (and there may well be more functionality that I'm unaware of) is to do things in the UI as it renders. That by itself is nothing to record in history. However, if the user goes through with his action, then any data element changes will be recorded.
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.
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.