The new JIRA has been installed and i am facing the issue in script-runner. I m searching for 4 days.
The two point is provided below which i need to fix:
1. I am unable to restrict for update the value of an issue at the time of issue update event. I had created a script on script listener.
2. Instead of hard coded value for key, i want to use dynamic code on script-runner. Means if the ticket is sub-task issue and project will be the same then the below script will execute.
Here the script is provided below and the requirement is duedate value for Task IssueType should be greater than the Duedate value for n number of subtask IssueType :
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.issue.Issue
import groovy.transform.BaseScript
import com.onresolve.scriptrunner.runner.customisers.ContextBaseScript
import com.onresolve.scriptrunner.runner.util.UserMessageUtil
import com.opensymphony.workflow.InvalidInputException
//
@BaseScript ContextBaseScript script
Issue issue = getIssueOrDefault("TEST-258") // Hard coded issue-key defined
if(issue.parentObject.dueDate.compareTo(issue.getDueDate()) >= 0)
{
UserMessageUtil.success("Due Date Success"+issue.dueDate)
log.debug(issue.getDueDate())
}
else
{
UserMessageUtil.success('Please enter the Subtask duedate that is less than Parent-Task Due-Date ')
//throw new InvalidInputException("Input not valid")
}
The problem is that when the condition fails then the date will be update first and next the pop up alert is raised which i mentioned in the code but I am unable to restrict the due date update. Also recommend us for second point on run-time environment(on production).
You might want to try this then (https://marketplace.atlassian.com/plugins/com.botronsoft.jira.configurationmanager).
Hum, that seems exactly what I need :) I will give a try!
Thank you :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Plan runners add on adds task to run build plans, test plans, create release, re-deploy , promote deployments or rollback releases as well as REST API
https://marketplace.atlassian.com/plugins/com.mdb.plugins.planrunners/server/overview
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.