Hi Team,
We are trying to make Specific field to non-editable to users, somehow expression is not working properly.
I am pasting the expression below, kindly go through and suggest if any errors in these.
Hi @mbrk
Your script looks good, but there is one thing that is worth changing.
The makeRequest function returns a Response object (as far as I know), and you need to parse the body (use .json()) to access the roles. Something like the below
const getProjectRolesForCurrentUser = await makeRequest(`/rest/api/3/project/${projectId}/roledetails?currentMember=true`);
const roles = await getProjectRolesForCurrentUser.json();
const roleNames = roles.map(item => item.name);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.