#271 Migration script from trac to pagure
Closed: Fixed 7 years ago Opened 8 years ago by pingou.

We should write a script to facilitate migrating tickets from trac to pagure.

First idea would be to rely on the XML-RPC interface of trac and the API of pagure: https://pagure.io/api/0


@d3prof3t I see this ticket is assigned to you, do you work on this, is there a way "I can help"? (I'm still learning python ..., but maybe I can do it)

This looks like interesting "mini-project" for me but I have few questions about this (at least for now, later I will probably have more questions, can ask on #fedora-apps too)
1. What we need to import? Only active not closed tickets? (...?)
2. What do you think is the best way of doing it?
- Get all tickets from trac instance of the project, and store them in a local db, then for every ticket create a new one here for the same project (I still didn't look at the pagure API, I was just playing with trac using 'xmlrpc')
- migrating them "manually" one-by-one?
- at runtime, get a list of ticket IDs, and for every ticket create a new one here?

Any comments/suggestions on how to implement this are welcome! :-)

@bitlord I am also learning python, and yes I will be working this weekend on this ticket. If ypu want we can discuss and work together on it if that suits you.
Let me know if you interested, then we can catch up on #fedora-apps.

@bitlord I am also learning python, and yes I will be working this weekend on this ticket. If ypu want we can discuss and work together on it if that suits you.
Let me know if you interested, then we can catch up on #fedora-apps.

main problem with me is time, not sure when I will have some free time, so I cannot say I'll be there at the specific date/time, when I'm online I'm on #fedora-apps and some other #fedora* channels with the same nick as here.

If you create a repo somewhere and have a working/partially working code, I can read it, comment, maybe contribute some patches ... (not sure if I'm ready for this, looks interesting, I contributed few smaller patches (easy-fix) for fedora-infra, so not much experience)

@bitlord same problem is with me my day job consumes most of my time, i'll keep my eyes open on #fedora-* channels if I find you online I'll surely ping you and you also do the same, so that if not then atleast, we can schedule some common time for the discussion on this ticket.

  1. What we need to import? Only active not closed tickets? (...?)

I would want to import all the tickets, the idea is to support project moving away from trac to pagure

  1. What do you think is the best way of doing it?
    - Get all tickets from trac instance of the project, and store them in a local db, then for every ticket create a new one > here for the same project (I still didn't look at the pagure API, I was just playing with trac using 'xmlrpc')
    - migrating them "manually" one-by-one?
    - at runtime, get a list of ticket IDs, and for every ticket create a new one here?

I think the later, get the list of all the tickets and trac and create their replicate in pagure.
There are fields we won't be able to re-use, some we will need to adjust (like roadmap might become tag or so).

What do you think of this?

@pingou Yes, I also think that would be a better idea. And as far as the fields are concerned that we won't be able to reuse, we can make a list of them and the ones that we can use.

Any progress on this? May I help?

Yes, I just wanted to ask, what things I should know before attempting to
fix this issue?
Although I did start with reading about XML RPC. Please let me know other
things that I should know before doing work on this ticket.

On Fri, Oct 16, 2015 at 3:31 PM, pagure@pagure.io wrote:

pingou added a new comment to an issue you are following:
Any progress on this? May I help?

To reply, visit the link belowor just reply to this email
https://pagure.io/pagure/issue/271

Yes, I just wanted to ask, what things I should know before attempting to
fix this issue?
Although I did start with reading about XML RPC. Please let me know other
things that I should know before doing work on this ticket.

I think that's a good starting point.
You may also want to look at the libpagure library (https://pagure.io/libpagure)
which may help for the pagure side.

Okay, thanks. Will update you soon.

On Fri, Oct 16, 2015 at 9:54 PM, pagure@pagure.io wrote:

pingou added a new comment to an issue you are following:
``

Yes, I just wanted to ask, what things I should know before attempting to
fix this issue?
Although I did start with reading about XML RPC. Please let me know other
things that I should know before doing work on this ticket.

I think that's a good starting point.
You may also want to look at the libpagure library (
https://pagure.io/libpagure)
which may help for the pagure side.

``

To reply, visit the link belowor just reply to this email
https://pagure.io/pagure/issue/271

Any progress ? :)
Need help with something ? :)

/me
I lost interest in this (problems, my current job takes my time and energy, so no time to do anything, impossible to learn new things).

I still have a small test/in_progress(python script)(actually few lines of code) which can get number of tickets, get any ticket (if publicly available, for others it will need account/login with permissions (should work)), and it can create ticketID.html file (just for testing, displaying data) with the data and some simple formatting (All ticket fields + description + all comments) I think that is enough information needed to file ticket on new system.

Problems:
1) Translation/skipping tags/fields which don't exist on pagure. (I guess need some "mapping" "x->x, y->z" ...)
2) For description/comments "translation" of special formating characters/syntax (code, bold, numbering, ...) (I planed to do it with regular expression but didn't write any code for it, no testing so I don't know will it work that way. (it is always possible as a "backup" solution to go over every comment find special characters and swap them with ones which work here)
3) Putting original description+comments/discussion in first comment or separately?

Not sure if ^^ is defined can help people to implement this.

@bitlord

Hi, can u show me your script which you have written?

So what should we do about this bug? Is there still anyone willing to work on this?

I think it might be good to collaborate with @vivekanand1101 on the project https://pagure.io/pagure-importer to add a trac backend/component to it

Hi pingou

So, the thing is since I haven't worked on Trac at all before, and I've
been having doubts. So, it would be really nice if you could just assist me
a bit more for this first time so that I understand it well.

If that's fine then I can start on it in the weekend. And today I'll have a
chat with you on irc channel.

Sounds good?
On Feb 3, 2016 2:33 PM, pagure@pagure.io wrote:

pingou added a new comment to an issue you are following:
``
So what should we do about this bug? Is there still anyone willing to work
on this?

I think it might be good to collaborate with @vivekanand1101 on the
project https://pagure.io/pagure-importer to add a trac backend/component
to it
``

To reply, visit the link belowor just reply to this email
https://pagure.io/pagure/issue/271

Hi @pingou

So, the thing is since I haven't worked on Trac at all before, and I've been having doubts. So, it would be really nice if you could just assist me a bit more for this first time so that I understand it well.

If that's fine then I can start on it in the weekend. And today I'll have a chat with you on irc channel.

Sounds good?

Hi there,

How are things going? Do you need help with anything?

There are more and more talks about moving projects on fedorahosted to pagure, so this ticket is getting some attention. Let us know if you need anything :)

Hi

I am really not finding time to work on it. I guess it would be better for
me to back off from it for now, and later pitch in for some other easy fix
ticket.

Sorry.

On Thu, Mar 10, 2016 at 11:52 PM, pagure@pagure.io wrote:

pingou added a new comment to an issue you are following:
``
Hi there,

How are things going? Do you need help with anything?

There are more and more talks about moving projects on fedorahosted to
pagure, so this ticket is getting some attention. Let us know if you need
anything :)
``

To reply, visit the link belowor just reply to this email
https://pagure.io/pagure/issue/271

Hi @d3prof3t,

Thanks for the comment, I'll un-assign the ticket so that someone can pick it up if desired.

Feel free to come back to pagure anytime you want/can, we'll make sure to always have a small easyfix for you ;-)

Thanks, a lot.

On Fri, Mar 11, 2016 at 3:09 AM, pagure@pagure.io wrote:

pingou added a new comment to an issue you are following:
``
Hi @d3prof3t,

Thanks for the comment, I'll un-assign the ticket so that someone can pick
it up if desired.

Feel free to come back to pagure anytime you want/can, we'll make sure to
always have a small easyfix for you ;-)
``

To reply, visit the link belowor just reply to this email
https://pagure.io/pagure/issue/271

I ll work on this issue,

I ll have some time in the next couple of days. I ll add a Trac importer to https://pagure.io/pagure-importer

@cverna , thanks for undertaking this. :)

I have updated the pagure-importer to include support for fedorahosted import:
https://pagure.io/pagure-importer/pull-request/6

I think this can be closed now :)

Thanks to everyone who worked on this!

@pingou changed the status to Fixed

7 years ago

Login to comment on this ticket.

Metadata