We have ScriptRunner, JMCF and JWT.
Hi,
Use Scriptrunner with this script:
import com.atlassian.jira.component.ComponentAccessordef commentManager = ComponentAccessor.getCommentManager()def comments = commentManager.getComments(issue)comments[0].created
Are you trying to create a calculated field that will display the date of the first comment that was posted on the issue and that is public in the Jira Service Desk sense? If that is the case and you're using JMCF 2.0, I can provide the script, just let me know.
Thanks! Will test it out!
Yes. Similar to how the resolution time is being calculated. For resolution time, I use the formula below:
@Formula: issue.get("resolutiondate")==null ? null : (issue.get("resolutiondate").getTime() - issue.get("created").getTime()) / 1000 / 60 -->
I've an existing response time that uses the transition field as reference. So step 1 is that I get the transition date/time then use that field to compare with created to get the response time.
However, I think it would be better if the comparison is between created date/time and time of first public comment.
The problem is identifying public comments - because there might be internal comments exchanged on the request before the first public comment is published.
In JMCF 2.1, coming out in the next few days, you'll be able to write:
issue.get("comment").find{!it.isInternal()}?.created
Thanks David! Will JMCF 2.1 allow us to use the fields on the dashboard moving forward?
It looks like you're new here. Sign in or register to get started.