tags:

views:

527

answers:

4

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

A: 

Please rephrase your question, cannot understad what you are asking about...

Kristian
A: 

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
    }

}
+1  A: 

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

Cheers, Nick Menere - JIRA Developer

Thanks for answering, Nick. Unfortunately, I don't have access to JIRA source. Is there any other way?
A: 

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

Evgeny