Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Destrict Assignee for users

Mandia January 9, 2019

Hi all,

I have a question need your help. For exp, if parent issuetype == Task. Only user in Project Role Administrators can edit assignee filed in sub-task. Can I use SIL script to implment this?

Since I can't use property.

 

Thanks,

Mandia

1 answer

0 votes
Alexey Matveev
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.
January 9, 2019

Hello,

You could use SIL for it.

Create a live field with a code like this:

if (isNotNull(parent)) {

if (%parent%.issueType == "Task" && !isUserInRole(currentUser(), key, "Administrators")) {

lfDisable("assignee");
}

}

lfEnable("assignee");
Mandia January 10, 2019

Hi @Alexey Matveev

I use this SiL, bu tit doesn't work. So my guessing is since the Assignee field is a system field. So we can't disable it. I use another filed, such as "Start Date" then it works.

So do you have anyother suggestions to implement my request?

 

Thanks for help!

Alexey Matveev
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.
January 10, 2019

I was able to disable the Assignee field with a code like this:

lfDisable("assignee");
Mandia January 15, 2019

Hi @Alexey Matveev

Thanks for your reply! I updated my code and it works now! But I have a issue. When su-task is in Closed status, the live filed doesn't work in View screen. But it works fine in edit screen. Do you know the reason?

Alexey Matveev
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.
January 15, 2019

That is strange. Maybe you have some other Live Fields, which influence this behaviour?

Suggest an answer

Log in or Sign up to answer