Hello,
i'm currently developing a converter from Rational Clearquest to Mantis for my Company.
I've managed to get everything to work (bugs are imported with correct date desc and so on) except the attachments.
The ImportXML Plugin has been rewritten for this purpose.
So currently the bug is created with the data from the .xml file and I get the path to the attachment.
Now my Problem:
To make it short, I can't upload the attachment because the function file_add() expects an array.
I currently only have the bug ID and the Path to the attachment.
Is there a way to create the necessary information expected by file_add() with these informations?
regards,
Haynes
attachment import
Moderators: Developer, Contributor
Re: attachment import
The easiest way would be to setup MantisBT to use DISK for attachment storage.
Here are the steps I recommend:
1. Setup MantisBT to use DISK attachments.
2. Place the attachment in the appropriate upload path for the project.
3. Insert a record into the DB that refers to the file (see the last 10 lines of core/file_api.php file_add() function).
4. Insert the history record if required and touch up the bug last updated time. [optional]
Here are the steps I recommend:
1. Setup MantisBT to use DISK attachments.
2. Place the attachment in the appropriate upload path for the project.
3. Insert a record into the DB that refers to the file (see the last 10 lines of core/file_api.php file_add() function).
4. Insert the history record if required and touch up the bug last updated time. [optional]
Migrate your MantisBT to the MantisHub Cloud
-
Kugelfisch
- Posts: 2
- Joined: 15 Oct 2009, 06:15
Re: attachment import
Thanks for the quick reply vboctor 
I managed to import an attachment
It still needs some tuning to import all attachments, but it's a start.
The only "problem" I have now is a cosmetical thing. Scince I can't use the $_FILES variable I currently can't get the filetype of the file.
I'm currently using the php function filetype() but it only returns "file" as a value.
Any ideas how to solve this?
I managed to import an attachment
It still needs some tuning to import all attachments, but it's a start.
The only "problem" I have now is a cosmetical thing. Scince I can't use the $_FILES variable I currently can't get the filetype of the file.
I'm currently using the php function filetype() but it only returns "file" as a value.
Any ideas how to solve this?
Re: attachment import
Hi Kugelfisch,
Any chance you could share your Clearquest -> Mantis converter? I need to do the same thing.
Regards,
Jeff
Any chance you could share your Clearquest -> Mantis converter? I need to do the same thing.
Regards,
Jeff
-
swapna
Clearquest to Mantis BT Migration
Hi,
I am looking for a clearquest to mantis Bt migration. Please any one the process of this migration please share..
I am pretty new to Mantis.
I have installed the Mantis 1.2.8 and Mysql.
Thanks in advance!
I am looking for a clearquest to mantis Bt migration. Please any one the process of this migration please share..
I am pretty new to Mantis.
I have installed the Mantis 1.2.8 and Mysql.
Thanks in advance!