Importing attachments
Moderators: Developer, Contributor
-
- Posts: 65
- Joined: 11 Jan 2024, 19:32
Importing attachments
Is it possible to import attachments along with existing data from another issue tracker (via CSV import tool)?
Losing attachments from our 15 years of data will be a barrier. Probably should have thought to ask this before but I was in the weeds with figuring out to get basic ticket data imported.
Losing attachments from our 15 years of data will be a barrier. Probably should have thought to ask this before but I was in the weeds with figuring out to get basic ticket data imported.
Re: Importing attachments
Yes that can be done but you need to use a script to get this done.
Re: Importing attachments
Some more documentation (or a link to that) would come in handy
Re: Importing attachments
Is there also a description of how the plugin works (there is no accompanying document with the plaugin itself) and how to construct the XML such that they are ready for the import?
-
- Posts: 65
- Joined: 11 Jan 2024, 19:32
Re: Importing attachments
I'm looking into doing this myself. The CSV import plugin does not handle attachments - just ticket data and users.
Is there an API I could use to get a new MantisBT ticket identifier, so I could somehow link the newly created MantisBT ticket with a separate stack of attachments (which do not have any knowledge of MantisBT)?
-
- Posts: 65
- Joined: 11 Jan 2024, 19:32
Re: Importing attachments
I also requested a link to the docs to see how attachments can be handled. let's wait for that.
-
- Posts: 65
- Joined: 11 Jan 2024, 19:32
Re: Importing attachments
Even in the best case scenario I don't see how more than one attachment per ticket could be done. About half of our tickets with attachments have more than 2 attachments.
Agree, will wait for more enlightenment.
Agree, will wait for more enlightenment.
Re: Importing attachments
@cas I am not aware that there is an up to date end user documentation, but the original design document (wow, it was written in 2008, the year when I started using MantisBT) should help to understand the concept https://www.mantisbt.org/wiki/doku.php/ ... portexport
Concerning the XML format: There is a DTD in the root folder of the plugin.
Unfortunately it was not updated when attachments wew added https://www.mantisbt.org/bugs/view.php?id=12013
but it should not be a big deal, as the source code for export/import is not that hard to understand.
Export an issue with a small attachment. I guess you will understand how it works.
@acoder2020 you might also be interested in the MantisBT REST API as one more option how to create issues, see
https://www.mantisbt.org/docs/master/en ... p/#restapi
Not recommend, but the very last chance to get it done: Direct access to the database, see the ERD https://www.mantisbt.org/docs/master/en ... tabase.erd
Concerning the XML format: There is a DTD in the root folder of the plugin.
Unfortunately it was not updated when attachments wew added https://www.mantisbt.org/bugs/view.php?id=12013
but it should not be a big deal, as the source code for export/import is not that hard to understand.
Export an issue with a small attachment. I guess you will understand how it works.
@acoder2020 you might also be interested in the MantisBT REST API as one more option how to create issues, see
https://www.mantisbt.org/docs/master/en ... p/#restapi
Not recommend, but the very last chance to get it done: Direct access to the database, see the ERD https://www.mantisbt.org/docs/master/en ... tabase.erd
-
- Posts: 65
- Joined: 11 Jan 2024, 19:32
Re: Importing attachments
How big of a mountain would it be to ask to have that documentation either updated or expanded? Would that be a "bug" request of some kind?atrol wrote: ↑29 Jan 2024, 21:12Concerning the XML format: There is a DTD in the root folder of the plugin.
Unfortunately it was not updated when attachments wew added https://www.mantisbt.org/bugs/view.php?id=12013
but it should not be a big deal, as the source code for export/import is not that hard to understand.
Export an issue with a small attachment. I guess you will understand how it works.
-
- Posts: 65
- Joined: 11 Jan 2024, 19:32
Re: Importing attachments
Linking to another thread where someone was apparently able to import an attachment with XML, but they did not provide an example XML file: viewtopic.php?t=24805
-
- Posts: 65
- Joined: 11 Jan 2024, 19:32
Re: Importing attachments
Wait, where is the XMLImportExport plugin located? It's not listed on the official plugins page:
https://www.mantisbt.org/wiki/doku.php/ ... gins:start
https://www.mantisbt.org/wiki/doku.php/ ... gins:start
-
- Posts: 65
- Joined: 11 Jan 2024, 19:32
Re: Importing attachments
The documentation for setting up and using REST api in mantis is thin, but I found this guide which helps explain it for everyday end users:atrol wrote: ↑29 Jan 2024, 21:12 @acoder2020 you might also be interested in the MantisBT REST API as one more option how to create issues, see
https://www.mantisbt.org/docs/master/en ... p/#restapi
https://www.testingdocs.com/mantisbt-rest-api-guide/