disco
disco

Reputation:

JIRA - Updating summary from post function

How do you update a summary field's value from post function in JIRA?

Upvotes: 0

Views: 2150

Answers (3)

Nick Menere
Nick Menere

Reputation:

There is an inbuilt post function that allows you to change the summary - though only to a hard coded value.

If you wanted to modify the current summary, you will need to create a post function as mentioned.

If you have a commercial license, you should have access to the JIRA source. Check out the code in: src/java/com/atlassian/jira/workflow/function/issue/UpdateIssueFieldFunction.java

Upvotes: 2

Evgeny Zislis
Evgeny Zislis

Reputation: 6957

How about something like:

 transientVars.get("issue").setSummary(newValue);

Anyway, you should take a look here : http://confluence.atlassian.com/display/JIRA/Upgrading+Workflow+Plugins+for+JIRA+3.2

Upvotes: 0

disco
disco

Reputation:

Ok, I'll try to explain... For simplicity, suppose we have a post function and we want summary value changed to "foobar":

public class SomePostFunction implements FunctionProvider {

    public void execute(Map transientVars, Map args, PropertySet ps) throws WorkflowException {
        String newValue = "foobar";
        // TODO update summary so it's value becomes newValue
    }

}

Upvotes: 0

Related Questions