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

Karl Shlayfman June 13, 2012

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

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 13, 2012

Is the parent issue also assigned?

Karl Shlayfman June 13, 2012

yes it is assigned.

Karl Shlayfman June 13, 2012

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?

Karl Shlayfman June 13, 2012

is your last answer to my last comment?

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 13, 2012

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

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 13, 2012

Hmm, yes...

Karl Shlayfman June 13, 2012

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.

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 13, 2012

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

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 13, 2012

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

Karl Shlayfman June 13, 2012

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?

Karl Shlayfman June 13, 2012

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

Karl Shlayfman June 13, 2012

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

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 13, 2012

Yup. Try that.

Karl Shlayfman June 13, 2012

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

0 votes
Karl Shlayfman June 13, 2012

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events