Export GitLab CE issues to CSV

We use Omnibus GitLab at work, and it’s really very useful. We appreciate it a lot in the development process, as it aides a lot in being precise, organized and methodical.

It has been long time since they added a basic time tracking feature to issues: add estimate and spent time to issues, a useful tool for planning. Sadly, at least in  the Community Edition, it’s not possible to so much with that, beside opening every single issue and see the two values. That’s a shame…

We almost always add estimated time to issues, so we needed a way to summarize this estimate.

A quick way to export all the issues for a project is using PostgreSQL export function.

Enter PostgreSQL shell with:

gitlab-psql -d gitlabhq_production

Then run an SQL statement like this:

Copy (select iid, title, time_estimate from issues where project_id = '129' and state = 'opened') To '/tmp/issues.csv' With CSV DELIMITER ';';

The iid field is the internal id, while the id is the table’s auto increment. The guess here is the project_id, which you can figure out from the projects table.

2 pensieri su “Export GitLab CE issues to CSV

  1. Thanks.

    Copy (select projects.name,issues.title,issues.description from issues join projects on project_id = projects.id where state = ‘opened’) To ‘/tmp/issues.csv’ With CSV DELIMITER ‘,’;

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Solve : *
28 − 13 =


Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.