Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Does user-and-group-multi-selector exist as soy, or through other tool?

Dana
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.
July 23, 2013

I want to render user-and-group-multi-selector (like the same in branch permissions). So, question in subject.

If not, could you refer me to the way how to render it.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
cofarrell
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.
August 2, 2013

Hi Dana,

Sorry for the delay. I have to warn you up front that, unless documented, most of our JS libraries are considered private and as such we don't give any guarantee that it won't change at any point. This is puts us in a bind; we either tell you how to use an internal API that we may need to change and then which breaks your plugin, or we don't help you at all. Neither is ideal. :(

That aside, if you're happy to acknowledge these are _private_ APIs, this is how you would add a user-group selector:

var $myInput = $('<input type="text" name="my-input" />'); // normal text input

var UserAndGroupMultiSelector = require('feature/user/user-and-group-multi-selector');
var selector = new UserAndGroupMultiSelector($myInput);
selector.setSelectedItems({ users : [...], groups : [...] });
selector.getSelectedItems(); // returns { users : [...], groups : [...] }

I hope that helps. My advice might also be to raise a feature request for Stash to provide a public version of this API (which may well look exactly the same) so that you can use it a little more confidentally. Other plugin developers may then decide to vote on the issue as well.

Charles

Dana
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.
August 8, 2013

Thanks a lot! Feature request have been created https://jira.atlassian.com/browse/STASH-3754

TAGS
AUG Leaders

Atlassian Community Events