Project

General

Profile

Ajout de bug depuis une ligne de commande / Add Issue from command line

Added by Billy the kid over 15 years ago

Bonjour,

Je cherche à avoir la possibilité d'ajouter des "faits techniques" à partir d'une ligne de commande (afin d'automatiser la migration d'une base de suivi de bug sous excel convertie en txt vers Redmine, donc chaque ligne un bug avec n°,date de depot , priorité, description date de cloture, affectation).

Quelqu'un pourrait t-il m'indiquer comment ajouter une "demande" à partir d'une commande (sql ?, Ruby ?)

merci .


Hello,

I'm trying to migrate an old Excel file made for bug tracking into Redmine. I want to make this automaticaly fromcommand line with ruby ? or sql ? command (and not issue by issue then i'm going mad ...)

Anybody have an idea?

I'm a n00b whith sql or Ruby

Thanks


Replies (1)

RE: Ajout de bug depuis une ligne de commande / Add Issue from command line - Added by Simone Carletti over 15 years ago

First you should save your excel file as a CSV file that can be easily read from Ruby.
Then, simply loop over all your CSV file lines (you can use a custom CSV parser as FasterCSV) and for each line create a new project.

I would suggest to create a custom rake task for this, in order to be able to run it again if you need to import an other file.

The instructions to create a new issue can be extracted from IssuesController#edit method.

    (1-1/1)