Field value availability/selectability based on the logged-on user

View: New views
7 Messages — Rating Filter:   Alert me  

Field value availability/selectability based on the logged-on user

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

How can I accomplish the following?
1-  Based on the logged-on user, restrict the options available for the user to select for the project field 'Component'.  For example, Component has values - A, B, C, D, E.  When submitting/editing an issue, user 1 only sees values A, C, E as choices.  When submitting/editing an issue, user 2 only sees value B, D as choices.
2-  Similar question, but instead of Component, restrict the options available for the user to select for a custom field that is a dropdown list.
--
Post by sbatzel - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38453
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Field value availability/selectability based on the logged-on user

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think you can do this using the Behaviors plugin.
http://confluence.atlassian.com/display/JIRAEXT/Behaviours+Plugin

I've done something similar using this plugin, just not based on user permissions.
--
Post by MHarper - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38453
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Field value availability/selectability based on the logged-on user

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is there a way to do this using the 'basic' JIRA features - meaning without adding the Behaviours plugin?
--
Post by sbatzel - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38453
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Field value availability/selectability based on the logged-on user

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Not that I know of, sorry.
--
Post by MHarper - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38453
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Field value availability/selectability based on the logged-on user

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think you might be able to do it in plain Javascript.  The behaviours plugin makes the use of additional javascript a lot easier and more flexible, but you can still do some stuff without it.

I've certainly used it to control the options available in select lists, conditionally based on other fields.  But my code knowledge falls down on the "current user" side - I don't know how you would go about detecting who the current user is.
--
Post by broughn2 - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38453
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Field value availability/selectability based on the logged-on user

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, in plain javascript you can do things like hide fields if a value is selected, although you will be required to hard-code custom field IDs, which makes porting from test to production that much harder.

The idea behind the Behaviours plugin was to make the types of things you might do in JS easier, and to give you full access to the API, so that you can look up the current user, their roles and groups and so on.

cheers, jamie
--
Post by JamieEchlin - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38453
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Field value availability/selectability based on the logged-on user

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Which is exactly why I sneak the behaviours plugin into installs... ;-)
--
Post by broughn2 - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38453
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user