'Additional code' to add comment not working when an 'Action' is specified


*This issue has moved*

This issue has been moved permanently to Adaptavist's Product Support JIRA instance.

All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the
Can't access your account link in order to reset to a new password.

I've selected v3.0.5 above as there is no value of v3.0.6 yet in the affected versions available to select.

I've downloaded v3.0.6 and tested it.
This definitely resolves this issue and I can now change the status of an issue via an 'Action' but it appears to have stopped the 'Additional Code' section from working.
It appears you can have either / or but not both.
If I remove the 'Action' the additional code (in my case adding a comment) works correctly. But with an action set the additional code to set a comment is having no effect - but the action to change the issue status is working.




Maik Winter
June 25, 2015, 12:39 PM

Is there an update regarding the issue? The problem described on https://jira.atlassian.com/browse/JRA-31690 is solved but the initial issue is not fixed. Or is the mentioned short term solution (transsition screen with a comment field) the final solution?


Normann P. Nielsen
April 28, 2015, 12:29 PM

It does not work for me either, workaround:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.comments.CommentManager

CommentManager commentManager = ComponentAccessor.getCommentManager();
commentManager.create(issue,"automation", "bla bla bla \n bla bla ", true);

This makes a comment

Jamie Echlin
October 6, 2014, 8:04 PM

I think this was always the case, and not specific to global actions.

Adding issueInputParameters.setSkipScreenCheck(true) should work but does not.

Seems to me that this is caused by https://jira.atlassian.com/browse/JRA-31690. Please could you vote for that.

In the short term the only solution I could offer is to make sure there is a transition screen, and that the comment field is on it.

Julian Flatt
October 6, 2014, 10:45 AM

Hi Jamie. Thanks for the quick response.

What I'm trying to do is as follows :-

I have two statuses (ISLA & OSLA) which are associated with a Resolution of 'Done'. I am using these statuses to determine if an issue hit its Service Level Agreement (SLA) based on a JQL query. If the user hasn't set the status to the correct one when resolving the issue I'm using Escalation Service to change the status and add a comment saying that it has been changed and why.

The JQL query I'm using to identify issues that may need to be changed to 'OSLA' is :-

project = "Escalation Service Testing - Julian" AND labels in (wipint, wipext, wiptp) AND resolution = Done AND resolutiondate > startOfDay() AND createdDate < startOfDay(-2d) and status != OSLA

The 'Action' I'm specifying is OSLA(81)
and the 'Additional Issue actions' are :-
issueInputParameters.setComment('Issue did not meet SLA of 2 days. Issue status automatically changed to OSLA')

When I set up a test case that meets the above JQL criteria and then click on the 'Run Now' option to test it I get this message :-

Number of issues returned by query: 1
Issue ESTJ-4 transitioned from ISLA to OSLA

And the status of the issue has indeed changed to OSLA. But no comment has been added.

If I set the test up again but this time set the 'Action' to 'None' and then click 'Run Now' I get this message :-

Number of issues returned by query: 1
Issue ESTJ-4 updated (no action defined)

This time the comment gets correctly added to the issue :-

Julian Flatt (Aviva UK) added a comment - 06/Oct/14 10:42 AM
Issue did not meet SLA of 2 days. Issue status automatically changed to OSLA

So the additional code to add the comment works correctly. The code to change the status also works. But when both are specified only the status gets changed and the comment does not get set. I feel that I'm missing something obvious here but can't see what.


Jamie Echlin
October 5, 2014, 1:55 PM

I don't think your diagnosis is right, I can't see how it would have stopped the "additional code" working in the general case.

How are you setting a comment, what is your code?

More likely you don't have a screen for that action and you are using issueInputParameters, which is ignoring it because no screen or not on screen.

Your pinned fields
Click on the next to a field label to start pinning.


Jamie Echlin


Julian Flatt

Internal Complexity


Internal Value