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

How to remove Groups from Project Role(Ex- Users Role) in particular project using API call

mihan ayeshana August 28, 2012

I want to remove groups in Users role in a given project using api call . How can i do that? I can remove all the groups and users using

jiraSoapService.removeAllRoleActorsByProject(authToken,remoteProject);

But i want to remove only groups of Role - Users how can i do that?

Thanks

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Henning Tietgens
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.
September 10, 2012
The actorType in JAVA is com.atlassian.jira.security.roles.actor.GroupRoleActorFactory.TYPE which currently results in the String "atlassian-group-role-actor" or com.atlassian.jira.security.roles.actor.UserRoleActorFactory.TYPE which results in the String "atlassian-user-role-actor". I hope this helps.

Henning
mihan ayeshana September 12, 2012

Same error .......

Henning Tietgens
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.
September 13, 2012

What did you use as actorType? What's the error message exactly?

0 votes
mihan ayeshana August 29, 2012

Any ansers? it's argent

0 votes
Harry Chan
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 29, 2012

Hi, it sounds like you need to remove actors from a project role?

removeActorsFromProjectRole(java.lang.String token, java.lang.String[] actors, RemoteProjectRole projectRole, RemoteProject project, java.lang.String actorType)

mihan ayeshana August 29, 2012

I try this. before i post this qustion. But thing i want to do is remove the group all the people are in. Not one by one

Harry Chan
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 30, 2012

Hi, can you clarify what you mean and require? That function can remove an actor (group) from a particular project role.

mihan ayeshana August 30, 2012

Any ansers?

mihan ayeshana August 30, 2012

This the group i want to remove( Red circled one) . How to remove only that group


Harry Chan
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 30, 2012

Hi, this is an actor called support in the project role User. The actor type is a group.

mihan ayeshana August 30, 2012

This the group i want to remove( Red circled one) . How to remove only that group

mihan ayeshana August 30, 2012

This the group i want to remove( Red circled one) . How to remove only that group


mihan ayeshana August 30, 2012

This the group i want to remove( Red circled one) . How to remove only that group

mihan ayeshana August 30, 2012

Ok i know it. But how can i write api call to remove this group? Becuse is a group of users.

mihan ayeshana August 30, 2012

Any anser? for this

Harry Chan
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 30, 2012

Please use the function I provided in the original answer. If you face any errors or issues let us know what they are.

mihan ayeshana August 30, 2012

removeActorsFromProjectRole(java.lang.String token, java.lang.String[] actors, RemoteProjectRole projectRole, RemoteProject project, java.lang.String actorType)

But this required java.lang.String[] actors - but i only the group name not the users in the group

Harry Chan
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 30, 2012

Hi, an actor can be a group? Do you still have issues?

mihan ayeshana August 31, 2012

Yep still i have the problem

RemoteProjectRole remoteProjectRole = jiraSoapService.getProjectRole(authToken,id);

String[] user = new String[1];

user[0]= "support";

jiraSoapService.removeActorsFromProjectRole(authToken, user,remoteProjectRole,remoteProject,"group") ;

This is end up with an error. why is that

Harry Chan
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 31, 2012

Can you please attach a log and/or describe what the error is? You should be able to get some axis logs from the soap error.

mihan ayeshana August 31, 2012

This is the error message

Exception in thread "main" AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

faultSubcode:

faultString: java.lang.IllegalArgumentException: Type group is not a registered RoleActor implementation

faultActor:

faultNode:

faultDetail:

{}faultData:null

{http://xml.apache.org/axis/}hostname:****

java.lang.IllegalArgumentException: Type group is not a registered RoleActor implementation

at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)

at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)

at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2938)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)

Harry Chan
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.
September 1, 2012

actorType - is a type that defines the type of role actor to instantiate (ex./ UserRoleActor.TYPE, GroupRoleActor.TYPE)

mihan ayeshana September 1, 2012

Still have same error

String[] user = new String[1];

user[0]= "********";

jiraSoapService.removeActorsFromProjectRole(authToken,user,remoteProjectRole,remoteProject,"GroupRoleActor.Users");

Also i tried by puting these types as actor Type also : "GroupRoleActor.TYPE","UserRoleActor.TYPE","UserRoleActor.groups","GroupRoleActor.group"

but all end up with an error

mihan ayeshana September 2, 2012

Any updates on this?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events