Set internal comment tab as default via Script Runner Behaviours

Mischa Elbert March 25, 2018

I would like to change the default comment tab from 'Respond to customer' to 'Internal comment' in some transition screens.

Is this possible to configure via Behaviours?
I am not very experienced with scripting and I thought something like this might work:

if (getAction() == "21" ) {
    switchTab(1)
}

I know the action ID for the transitions I want the switch to happen is 21 and 31.
What I wanted to to is: if the transition is 21, then set focus on tab(1) (which is internal comment).

2018-03-23_105700.jpg

1 answer

2 votes
Maitrey Patel April 30, 2018

Hi Mischa,

You can use Javascript/Jquery to do this. Go to your field configuration section and edit "Comment" field. In the description part just add the following code:

<script type="text/javascript">

$('a:contains("Internal comment")').click();

</script>

This will click Internal Comment tab so which becomes default comment.

Steve Letch August 8, 2019

Hi

 

I applied this and it didnt work for some reason

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events