Hi
When a story is moved to done and resolution is NOT fixed , i want a post function that removes story points from story .
Hope for reply
If you have such plugins as Power Script or ScriptRunner, you could develop such post function.
Hi Alexey,
Please can you give me in detail to develop such post function in script runner
Go to the required workflow, choose add post function, then choose Script PostFunction, then Custom Script Function and write something like this
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.event.type.EventDispatchOptiondef user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()def storyPointsCS = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Story Points")issue.setCustomFieldValue(storyPointsCS, null)ComponentAccessor.getIssueManager().updateIssue(user, issue, EventDispatchOption.ISSUE_UPDATED, false)
Hi Kondaparthy,
you could also use a post function provided by another app on the marketplace called Jira Workflow Toolbox developed by us (e.g. "Copy parsed text to a field" or "Set field as function of other fields") to set the field to null with a conditional execution using a boolean expression like resolution != fixed. May be easier than scripting
Best, Max
Hi Alexy,
I tried using the script but the script is directly deleting the story points.
I also tried to put a condition comparing the Resolution and then deleting the story points depending on the condition. But was unsuccessful
Could you please help me with the script having a condition as If resolution is not Done then the story points should be deleted.
Thanks in Advance.
It looks like you're new here. Sign in or register to get started.