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
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 :D
Best, Max
If you have such plugins as Power Script or ScriptRunner, you could develop such post function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexey,
Please can you give me in detail to develop such post function in script runner
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.ComponentAccessor
import com.atlassian.jira.event.type.EventDispatchOption
def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def storyPointsCS = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Story Points")
issue.setCustomFieldValue(storyPointsCS, null)
ComponentAccessor.getIssueManager().updateIssue(user, issue, EventDispatchOption.ISSUE_UPDATED, false)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.