I have stories that are linked to Epics using Epic Link field. This makes the Epic the parent issue of the Story.
There are two field for the Epic issue type:
I need help creating a groovy script for the workflow validator that does the following for:
When moving the Story to the closed status, a groovy script validator should check the following:
- If the story has no linked Epic - the story can be closed without any restriction
- If the story has an epic linked - the field Program Eligibility is set to No - the story can be closed without any restriction
- If the story has an epic linked - the field Program Eligibility is set to Yes - the field Program Name is not null and has a value selected - the story can be closed without restriction
- If the story has an epic linked - the field Program Eligibility on the Epic is set to Yes - the field Program Name on the Epic is null - the story cannot be closed and display an error that the Linked Epic field has a null Program Name since the Program Eligibility is Yes, the Program name must be selected for the Epic.
I think you should try to write the script yourself and then ask for help, if something does not work.
I don't have any experience writing groovy scripts or any type of programing code and couldn't find any resources that could help me even get started. Please provide any resource you many have on groovy scripts 101. I would be more than happy to test out myself.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can find how to check for epic link here:
You can find here how to get the value of a custom field
And you can find here how to cancel a transition:
I guess, that is all you need to know to write your validator.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you!
I will test it out and post on here once I have something.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.