Reference Qualifier roles=itil not working

Oliver13
Mega Guru

Hello,

Please help me.

I am setting up this Reference Qualifier on table Story for field Epic. Epic is a reference field referencing table Epic. 

I set up this first: javascript:'stateNOT IN3,4^EQ^' + ScrumSecurityManager.getStoryDotEpic(current) and it worked.

Then I set up this javascript:'stateNOT IN3,4^EQ^roles=itil^' + ScrumSecurityManager.getStoryDotEpic(current), it doesn't work as I wanted. I want to restrict it to users with role 'itil'. The second 'Reference qual' works exactly the same as the first one.

May I ask how can I add roles to the first 'Reference qual' to make it work?

Thank you so much.

find_real_file.png

1 ACCEPTED SOLUTION

Chander Bhusha1
Tera Guru

Hi Oliver,

The roles is not a field on the epic table so you can make use of gs.hasRole('itil') as below: Here the reference qualifier only apply if the user is not having having itil role

 

 javascript:if(!gs.hasRole('itil') 'stateNOT IN3,4^EQ^' + ScrumSecurityManager.getStoryDotEpic(current) ; 

 

If you are having any else condition also then you can use this :

javascript:if (!gs.hasRole('itil')) 'stateNOT IN3,4^EQ^' + ScrumSecurityManager.getStoryDotEpic(current) ; else ------your else condition------;

 

Please mark answer correct or helpful if it works.

Thanks,

CB

View solution in original post

6 REPLIES 6

Hello CB,

Thank you so so much. it worked. 

I have a question, why it is not sth like this?

javascript:if(!gs.hasRole('itil')^'stateNOT IN3,4^EQ^' + ScrumSecurityManager.getStoryDotEpic(current) or javascript:if(!gs.hasRole('itil') + 'stateNOT IN3,4^EQ^' + ScrumSecurityManager.getStoryDotEpic(current)

no need to use + or ^ as AND to connect if(!gs.hasRole('itil')) and 'stateNOT IN3,4^EQ^'?

 

Hi Oliver,

 

Ya you don't have to use + side or ^ sign to put the condition as you want if the user doesn't have role then you need this reference qualifier so it will come directly : as this is will only satisfy when the role condition.

if(!gs.hasRole('itil') 'stateNOT IN3,4^EQ^' + ScrumSecurityManager.getStoryDotEpic(current)

It means first part is satisfied then the reference qualifer will get applied its not addition to both the condition.

 

Please mark helpful.

Thanks,

CB