Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Button handy
blanktrue
color#0052CC
nameSend Feedback
linkhttps://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=Reschedule+issues+-+491000601
widthauto

Problem

You want the project lead to reschedule issues in one simple step which includes entering the fix versions, an assignee and an optional comment.

Solution

Create the action

Begin by creating the Reschedule action.

Condition script

Next, enter the following code to set the action as available only for the project lead and applicable only to issues that are not Resolved or Closed.

Condition script
Code Block
number ENABLED = 1;
number DISABLED = 2;
number HIDDEN = 3;

if(projectPM(project) == currentUser() && status != "Resolved" && status != "Closed"){
 return ENABLED;
}

return HIDDEN;

Screen script

Next, enter the below script to prompt the user to select fix versions and a new assignee (the default value is the initial assignee), and enter a comment.

Screen script
Code Block
string TEXT = "TEXT";
string TEXT_DISABLED = "TEXT_DISABLED";
string [] fields;

// fix versions
fields = addElement(fields, "Fix Versions");
fields = addElement(fields, TEXT);
fields = addElement(fields, "");

// assignee
fields = addElement(fields, "Assignee");
fields = addElement(fields, TEXT);
fields = addElement(fields, assignee);

// comment
fields = addElement(fields, "Comment");
fields = addElement(fields, TEXT);
fields = addElement(fields, "");

return fields; 

This code renders the following screen.

Tip

Assigning a string value that contains pipes to a string array splits the original string at the position of each pipe. Thus, you can use 1.0|2.0 as a value for Fix Versions to set multiple values.

Action script

Enter the following Action script.

Action script
Code Block
string [] fvers = getElement(argv, 1);
string newAssignee = getElement(argv, 3);
string comment = getElement(argv, 5);

fixVersions = fvers;
assignee = newAssignee;
if(isNotNull(comment)){
	addComment(key, currentUser(), comment);
}

Table of Contents

Table of Contents

...