We are facing an issue in JIRA Service Desk 4.2.3.
When agent is moving the ticket from Project A(HR) to Project B(IPAG) then SLA is not calculated properly as per new request area[i.e. Custom Field Name].
I.e. if new department is having 9 hours of SLA then , ticket should allow agent to resolve ticket for minimum 9 hours .
But in current scenario SLA is calculated on the creation date due to which agents are not getting sufficient time to resolve the tickets.(i.e. 9hours – times spent in previous department).
We had created a script listener for moving the ticket which is provided below:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.index.IssueIndexingService
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.IssueManager
import java.sql.Timestamp
import com.atlassian.jira.component.ComponentAccessor
import java.text.SimpleDateFormat
import java.sql.Timestamp
import java.util.Date
def changeItem = event?.getChangeLog()?.getRelated("ChildChangeItem")
def sourceProject = event?.getChangeLog()?.getRelated("ChildChangeItem")?.find {it.field == "project"}?.oldstring
def targetProject = event?.getChangeLog()?.getRelated("ChildChangeItem")?.find {it.field == "project"}?.newstring
def issue = event.getIssue()if (sourceProject && sourceProject != targetProject){
issue.setCreated(new Date().toTimestamp())
def issueIndexingService = ComponentAccessor.getComponent(IssueIndexingService)
issue.store()
issueIndexingService.reIndex(issue)
}
Kindly suggest us how to fixed this.
Recommended Learning For You
Level up your skills with Atlassian learning
Learning Path
Get the most out of Jira Service Management
Solve customer problems efficiently and deliver outstanding service experiences.
Learning Path
Adopt ITSM practices to deliver exceptional service
Become familiar with the principles and practices that drive ITSM. Then, learn how to configure and use Jira Service Management to implement them.
Atlassian Certified Associate
Jira Service Management Agent Essentials certification
Prove you know what's essential to providing efficient and resolution-focused service in Jira Service Management.
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.