Hi Community,
My use-case is:
1) There are 2 different workflows: Parent (Initiative - issuetype) WF and Child (Portfolio Epic - issuetype) WF. Parent issue and Child(ren) issue(s) is/are linked by Parent field (present on Child)
2) We are following Work Type Hierarchy (Initiative - level 3 > Portfolio Epic - level 2 > Feature - level 1 > Story > Sub-tasks) in Jira Software Cloud.
3) Conditions need to be added in code:
- If Parent (Initiative - issuetype) is IN "Done" status in Parent WF and ALL it's Child(ren) (Portfolio Epic - issuetype) are IN "Done" in Child WF - Then 2 custom fields: SelectList 1 and TextField1 should be visible to a user (who is part of User Group) on the Parent issue.
- If Parent is NOT in Done and ANY of it's child are NOT in Done - Then 2 custom fields should be hidden to user.
- If Parent is IN in Done and ALL it's Child(ren) are NOT in Done - Then 2 custom fields should be in ReadOnly mode for the user.
Please provide a sample code on how to achieve the above conditions on scriptrunner behavior in Jira Software Cloud.
Thanks