support with script

Description

Hi,

how can we deal with such case via scripted validation:
1. Time can be logged only on sub-tasks.
2. Only the assignee can have time logged in the subtask, unless it is a "xxx" sub-task.
3. Time can be logged only if sub-task status is "In progress".
4. Time may enter an assignee or some project role on behalf of assignee unless it is a sub-task of the "xxx" type.

How do you rate the level of complexity?

Regards,
Jacek

Environment

None

Activity

Show:
Deniz Oğuz
October 21, 2020, 6:27 AM

I have noticed that I got number 4 incorrectly. You don’t want to check subtask’s status, you want to check parent task’s status. I need to work on that condition.

Jacek Klimczak
October 21, 2020, 2:57 PM

I have 2 more questions:

1. Can I use somehow ID of transition? Just like: 'if transition ID = “41” then allow logging work'

Will it work like e.g. in scriptrunner?

2. How can I refer to a project role and status?
for example: if projectrole = sd team then allow logging work in any status

Deniz Oğuz
October 21, 2020, 4:40 PM

You can use following code to access parent of an issue, in the example it retrieves parent issue status if current issue is a subtask.

 

Deniz Oğuz
October 21, 2020, 4:45 PM
  1. Unfortunately transition ID is not available. It is only valid for workflow scripts and worklog verification is usually a separate operation.

  2. To check whether a user is member of a specific project role:

Jacek Klimczak
October 22, 2020, 8:54 AM

OK, thanks. Looks good!

Answered

Priority

Major

Assignee

Deniz Oğuz

Reporter

Jacek Klimczak

Affects versions

Fix versions

None

Labels

None

Source

None

Jira Version

Database Type/Version

PostgreSQL 9.6.15

Browser Type/Version

Chrome
Configure