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

File fields format for CLI plugin removeUsersWithFile

Jo-Anne MacLeod
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 7, 2012

Does anyone know what the file format is supposed to be to use the removeUsersWithFile option in the CLI Plugin. Don't tell me a csv, because I already know that part. I have a file that works perfectly with the addUsersWithFile, but it failes everytime on the remove. I've tried using just the user names, I've tried username,password,email,full name. I've search the cli plugin page. Lots of examples of the commands, but nothing to tell me what fields it wants in the file. I'm sure that I have seen an example of a file once before, but I don't seem to be able to find it now.

Has anything tried this option before?

3 answers

1 vote
Loïc Dewerchin December 5, 2014

Hello,

the question is a bit old , but I am posting an answer for the convenience of whoever stumbles on this problem =)

 

Had the same situation :

  • removing # of users with a file
  • got error in the process : "Client error: Error reading file: local_users_to_remove"

The problem is not the file you are working with, it is the error message!

What actually happens is that the user cannot be removed (is assigned to an issue, is a reporter or commented), nothing wrong with reading the file.

So you have to deactivate the user. Another word of warning there,  the email-address of the user has to be a valid format (often not the case when importing users in a migration).

If this is not the case , you will get a positive reply from JIRA CLI saying the user is inactive , when in fact the user is still active. You will have to use something like this:

$atlcli $instance --action updateUser --deactivate --userId YOURUSERID --userEmail YOURUSERID@makeitvalid.com

 

hope this helps someone...

 

best regards,

Loïc

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
December 5, 2014

Created JCLI-573 to cover this.

0 votes
Jo-Anne MacLeod
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 20, 2012

never got this to work, but came up with a method that didn't involve using this feature so it all worked out in the end.

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
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 7, 2012

Same file should work. Actually, it just needs the id as the first column in the csv file (no header line) as all the other information on the same line is ignored. Create an issue if this is not working.

Jo-Anne MacLeod
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 7, 2012

thats what I thought, but it is complaining about the file, "error reading file". I've verified that it is a real, valid csv file. And it works with the addusers so it should be in the right format. Its got me slightly baffeled.

Bob Swift OSS (Bob Swift Atlassian Apps)
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 7, 2012

Create an issue and attach the file.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events