Documentation for JIRA 4.2. Documentation for other versions of JIRA is available too.

Sometimes it is useful to get a list of users exported to CSV for various purposes. JIRA doesn't currently have this functionality but you can leverage various database functionalities to do this.

Run one of the following queries specific to your database. The output will consist of the id, username and full name of the users.

Always back up your data before performing any modification to the database.

MySQL

SELECT u.id, u.username, ps.propertyvalue INTO OUTFILE '/path/to/userlist.csv'
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    LINES TERMINATED BY '\n'
FROM userbase u JOIN propertyentry pe ON pe.entity_id = u.id JOIN propertystring ps ON ps.id = pe.id
WHERE  property_key = 'fullName' ORDER BY propertyvalue ASC;

PostgreSQL

SELECT u.id, u.username, ps.propertyvalue INTO TEMPORARY TABLE userdetails
FROM userbase u JOIN propertyentry pe ON pe.entity_id = u.id JOIN propertystring ps ON ps.id = pe.id
WHERE  property_key = 'fullName' ORDER BY propertyvalue asc;
copy userdetails to '/path/to/userlist.csv' using delimiters ',' CSV QUOTE AS '"';

Unknown macro: {htmlcomment}

Severity

Low
Regular Expression:
Article ID: JIRAKB231932846