Not able to transition parent task when all subtasks are resolved?

I am trying to close parent task when all subtask(s) are resolved. As i read the instruction that this should be done at the subtask workflow level typically under resolved and that is what I have done. I also moved this post function under Issue Resolved event per some comments in the instructions as well. Do you know what i might be missing?

I am using one of the script it came with "

Script workflow function : Transition parent when all subtasks are resolved "

Checked the logs and seeing many of these errors: [jira.groovy.listener.ScriptRunnerUberListener] property parse exception

2 answers

Also seeing this error when resolving subtask: /secure/CommentAssignIssue.jspa [groovy.canned.utils.WorkflowUtils] Errors: {assignee=Issues must be assigned.}

but it is assigned, so i am not sure what it is complaining about

0 vote

Is the parent issue also assigned?

yes it is assigned.

i was able to get around it by removing Assignee field from workflow screen, so that allowed me to change status. Now status is changing but resolution still says unresolved, any idea?

is your last answer to my last comment?

Add a post function in the workflow to set the resolution instead of setting it up on the screen.

Hmm, yes...

ok i tried that. when i am inside the issue I see that Status = resolved and resolution is fixed but when going to project Summary it is still showing that issue as Unresolved and listed under Reopened status which is what is was prior to transition.

Looks like the issue is not reindexed. Try using IssueIndexManager to reindex the parent issue in the script.

Yes, you have to do it in the script everytime the status is changed and resolution set.

I did it and it worked, but when i tried again it got stuck again, does it mean i have to do it every time?

so i will need to use my custom script by copying from Run Script, so that i can use inside the workflow right?

do you know with what extention and where on the server it needs to reside?

Yup. Try that.

I am not JAVA savy, i found this:

Where to put your scripts?
Give either the absolute path of the script, or path relative to the working directory of your JIRA instance, which is $CATALINA_BASE in the standalone version. Relative paths are more portable and make switching servers easier.

If you would like to separate out your scripts from jira, as of 2.0.3 you can you use the system property plugin.resource.directories which is a comma-delimited list of paths. Eg in setenv.sh you might add:

JAVA_OPTS=%JAVA_OPTS% -Dplugin.resource.directories=/opt/groovy

If your scripts/classes have packages, obviously, you will need the correct directories under there. If this property is set, scripts/classes found here will take precedence over any under WEB-INF/classes.

I guess i can put it anywhere on the server as long as I provide the absolute path? What about file format and extension? any help is appreciated.

Thanks

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

173 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you