I have this error on LOG:
"WORK_ON_ISSUES not granted by 'denied' workflow permission
WORK_ON_ISSUES granted by permission scheme but DENIED by workflow"
I remove all of properties but the error remain.
To you understand:
I have 2 workflows (1 workflow for parent and 1 workflow for subtask).
When I create an issue on JIRA, seems like that:
Parent TST-1000 (status: OPEN)
- Subtask TST-1001 (status: OPEN)
- Subtask TST-1002 (status: OPEN)
I would like to configure that subtasks can only have the button START if the PARENT be on status: IN PROGRESS.
I have 3 conditions on transition START:
1) Only the assignee of the issue can execute this transition.
2) Only users with Assignable User permission can execute this transition.
3) ScriptRunner workflow function - Custom script condition (inline script). issue.getStatus () == "In Progress"
If I choose "All of the following conditions", the button appears, but does not matter if the PARENT issue is on "OPEN" or "IN PROGRESS" status (so that is not working for me), and if I choose "Any of the following conditions", the button disappear.
I'm using JIRA 7.2 and scriptrunner 4.3.15, I don't know if the error is caused by JIRA or Scriptrunner.
Capture1.GIF
Capture_subtask.GIF
Capture_transition.GIF
Community moderators have prevented the ability to post new answers.
Your condition will check the subtask's status, not the parent issue. Instead of
issue.getStatus () == "In Progress"
Try
issue.parentObject?.status?.name == "In Progress" || !issue.parentObject
The second part of the condition will return true if the issue in question is not a sub-task.
I changed the script, but I still have the same problem.
On JIRA log: "WORK_ON_ISSUES not granted by 'denied' workflow permission
WORK_ON_ISSUES granted by permission scheme but DENIED by workflow"
I changed my permission scheme to "any logged user" and the transition "Start" is not appearing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is likely not due to your ScriptRunner conditions, but due to your permissions scheme on the workflow transition. See https://confluence.atlassian.com/jirakb/workflow-step-properties-blocks-transition-actions-744527384.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I saw this link and I did a test now using a new workflow without the properties.
I have the error too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just want to block the transition of the sub task "Start" when my parent issue is on "OPEN"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, there was a bug in my original answer. I fixed it now; I was getting the status object, but not the name property.
If you want to block the transition when the issue is open (rather than allow it when the issue is In Progress), try
issue.parentObject?.status?.name != "Open" || !issue.parentObject
If that still doesn't work, can you post screenshots of your Workflow Step Properties, along with the latest condition script you're using?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It worked now!
It seems that Santa came earlier!
Thank yoouuuu!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
where i need to apply below condition script, is it parent or sub-task workflow transition.
issue.parentObject?.status?.name != "Open" || !issue.parentObjects
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.