Hi @Helen Ahlberg you need to use postfunction. Snippet with the example code is here: https://library.adaptavist.com/entity/add-comment-to-an-issue-in-a-post-function
I want to have a pre-defined value comment on every transaction.
Not a comment after the action is done but during the transaction
ex
My issue is moved from A to B and when pressing go_to_B I want a predefined value shown
ex: Enter the check you have done:
so that users can enter a comment after, And I want all of this to end up under Comment (not a custom field)
Is this possible?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
but how can I do this in Script Runner?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Helen Ahlberg are you familiar with Behaviours (https://scriptrunner.adaptavist.com/6.20.0/jira/behaviours-overview.html)?
You can use this code in Behaviours script
def predefinedComment = "some comment"
getFieldById("comment").setFormValue(predefinedComment)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK - but this will give me a pre-defined comment when just creating the issue?
We have behaviuor scripts that populate text in the Description field but this only happens with create issue.
My user want to have different pre-define commenttext when tranfering the issue in its workflow - is this possible?
Question ->
getFieldById("comment")
is this the Jira 'field' comment?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, behaviours works on transitions similary. You can use conditions in your source code (transition name, target status name...)
https://library.adaptavist.com/entity/limit-a-behaviour-to-a-specific-workflow-action
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.