Custom issue links can not be added via workflow rule
I have the following rule defined that should be creating a ticket in another project and then adding my custom link "implemented with".
If i change the line "implemented with.add(ticket)" to "depends on.add(ticket)"... the workflow rule behaves as expected and created the issue link. With my custom link, i get the following error when i try to upload (or force upload) the workflow from the WE:
Double-clicking in the error on Workflow Editor show me this:
PS - I've also tried to create the issue link from the ticket variable (the other way).
var issueReporter = issue.reporter;
if (Type.name.startsWith("DB:", opts)) {
var ticket = issueReporter.createNewIssue("DBSTASK");
ticket.Charge Code = Charge Code;
ticket.Sprint = Sprint;
ticket.summary = "[" + Project Key + "] " + summary;
ticket.description = "sub-board element.";
ticket.Due Date = Due Date;
implemented with.add(ticket);
message("Created implementation ticket <a href='" + ticket.getUrl() + "'>" + ticket.getId() + "</a>!");
}
If i change the line "implemented with.add(ticket)" to "depends on.add(ticket)"... the workflow rule behaves as expected and created the issue link. With my custom link, i get the following error when i try to upload (or force upload) the workflow from the WE:
error executing script 'CollectRequirements' (jetbrains.youtrack.workflow.generator.template.requirements@generator) (see exception)
exception -> "java.lang.NullPointerException"
Double-clicking in the error on Workflow Editor show me this:
mapping script CollectRequirements
script kind : pre-process input model
modifies model : true
(model, genContext, operationContext)->void {
model.roots(IRule).where({~it => !(it.requirementsDisabled); }).forEach({~it => it.collectRequirementsx(); });
}
PS - I've also tried to create the issue link from the ticket variable (the other way).
Please sign in to leave a comment.
[idea.log] the idea.log file is attached.
It tells to the Workflow Editor not to generate field/value/links/etc requirements.
Please attach your workflow and provide fields and links scheme for the investigation.