I have Jira Command Line client installed on my Ubuntu linux system. I am running a script which reads users from a file and then add each user to a particular grp. my script goes like this:
while read -r user
./jira.sh --action addUserToGroup --userId "$user" --group "group1"
done < users.txt
where I have a text file "users.txt" containing about 2872 users. The scipt is running fine, except for the fact it is taking a lot of time. It is taking almost 1.5 minute to add a single user o the group. so, if we talk about 2872 users it will need about 30 hrs. so, wanted to ask that is there a poblem with my scrip that it is taking to long or is it ok for the script to take this much of a time.
From an efficiency and ease of use perspective, I would recommend using runFromCsv . For that you will need to add a userId column header as the first row of the file and then something like the following will work directly:
jira --action runFromCsv --common "--action addUserToGroup --group \"group1\" "
Of course it could still be slow if JIRA is taking a lot of time to add the user to the group. However, this is more efficient from a CLI perspective.
How to use runFromCsv has more information.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs