Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Adaptivist Scriptrunner issuefunction in lastcomment is returning incorrect issues

Trudy Claspill
Contributor
March 20, 2018

We are using JIRA 7.3.6 Data Center Edition. We have a Service Desk project set up. We have configured a Hipchat Integration between this project and a Hipchat room.

We want to post a message in the Hipchat room when the last comment entered on the issue is authored by a specific user. We are using the Adaptivist Scriptrunner code in our JQL thus:

issueFunction in lastComment("by cloudplatform")

The "cloudplatform" user is currently posting an Internal comment on the issues. We want the Hipchat notification to occur just when that comment is made.

The Hipchat notification is occurring when that comment is made. However, it also occurs again when another comment is added - a customer-visible comment. That should not be happening since that new, last comment is not authored by "cloudplatform".

Has anybody else run into this issue? I haven't found any reports of it in my searches through google.

1 answer

1 accepted

1 vote
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 23, 2018

I think this is a limitation of how Scriptrunner is determining last comment.  Granted Service Desk does have a different way of handling comments as opposed to other Jira project types.  But at the moment, it does not appear that Scriptrunner can currently do this.  But from looking at their bug tracker, it looks like this is a known limitation and there exists bug/feature request for this in https://productsupport.adaptavist.com/browse/SRJIRA-2132

I would recommend watching/voting for this on their tracker.  

In the meantime, I would be interested to see if perhaps there is an existing alternative solution.  For example, perhaps there is another plugin to Jira that provides a different JQL function, maybe something like JQL Tricks.  I know this has a function called commentedByUser([User]) but I don't know for sure if this would suffer the same limitation as scriptrunner here, or not.

Trudy Claspill
Contributor
April 2, 2018

Thank you for finding that issue, Andrew, and providing the link.

We do not have the JQL Tricks plugin, and we are not currently interested in adding another plugin to our environment for this one use case.

Suggest an answer

Log in or Sign up to answer