Aim: Use a Behaviour to set a default value for a custom field on the Create Screen, but hide it from all roles bar Administrator until a specific point in the workflow. The field needs to be populated at Create (with dummy placeholder text) otherwise the field won't exist on the issue for later population/edit via REST.
If a non-admin user creates the issue the field doesn't appear (correct), but when an admin user later views the issue the field isn't shown. I definitely have the Administrator role, but the behaviour logs suggest otherwise...even specifying my username in the except condition does not work.
Any assistance would be much appreciated. Thanks
Log :
2017-06-13 11:58:40,552 http-nio-8070-exec-13 DEBUG tdartford 718x11120x1 15gmqqg 10.231.17.20 /secure/AjaxIssueEditAction!default.jspa [c.o.jira.groovy.Behaviour] action must be: 21 2017-06-13 11:58:40,553 http-nio-8070-exec-13 DEBUG tdartford 718x11120x1 15gmqqg 10.231.17.20 /secure/AjaxIssueEditAction!default.jspa [c.o.jira.groovy.Behaviour] must be in role: 10002 2017-06-13 11:58:40,553 http-nio-8070-exec-13 DEBUG tdartford 718x11120x1 15gmqqg 10.231.17.20 /secure/AjaxIssueEditAction!default.jspa [c.o.jira.groovy.Behaviour] user tdartford(tdartford) must be in role Administrators
Hola Carlos David
The fact that you have administration permissions does not mean that you are in the group "Administrators". Your group might have administration permissions but that doesn't mean that you are in THAT group. I would advice you to take a look at which groups you are part of, maybe modify the script so that only the "developers" see it, and see if that works.
Let me know if that doesn't help.
Cheers.
Daniel Yelamos
Hi Daniel, thanks for getting back to me.
I've simplified the conditions, using a specific user condition, in an attempt to sort this problem out.
1. Creator is tcar (works)
Create screen: Field shown, autopopuated with the default value.
View screen: displayed for tcar, hidden for other users
2. Creator is another user
Create screen: Field not shown, log output shows that the field is populated behind the scenes however with the default value.
View Screen: Hidden for other user **and for tcar** despite the except condition shown below.
Any ideas?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Carlos David.
I want to demo this and see if I get the same behaviour as you do. Can you give me your scriptrunner and jira versions please?
Cheers
Dyelamos
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.