#6662 Add attachments to Export [ss5383]

v1.4.0
closed
General
Heith Seewald
2016-03-09
2013-09-17
Chris Tsai
No

[forge:site-support:#5383]

I like the new Project Data Export feature, but what about attachments to wiki, ticket, or discussion items? Not that I really want these encoded into a JSON file, but this isn't really a complete "copy for safekeeping" if the export only has URLs to sourceforge.net for any attached images, patch files, etc.

  1. We should put the attachments in a separate folder
  2. We should make attachments optional, so folks won't get an enormous backup if they don't want it

Related

Tickets: #8051

Discussion

  • Dave Brondsema

    Dave Brondsema - 2013-09-17
    • labels: --> export
    • Milestone: limbo --> forge-backlog
     
  • Dave Brondsema

    Dave Brondsema - 2016-01-22

    It'd be nice to show how big the attachments will be, on the export page. I was experimenting with mongo queries to see if it is possible, seems like it should be. Below is 2 queries to get the total size for 1 tool. Seems to work fine, although if you have many tools that could be a lot of queries. Maybe could do some more aggregation to do it all together in a few queries ($lookup aggregation operator looks interesting, but only available since mongo 3.2).

    file_ids = db.attachment.find({app_config_id: some_ac_id}).map(function(a) { return a.file_id });
    db.attachment.files.aggregate([
        {$match: {
            _id: {$in: file_ids},
        }},
        {$group: {
            _id: 'total',
            total_size: {$sum: "$length"},
        }}
    ]).result[0].total_size / 1024 / 1024;
    
     
  • Dave Brondsema

    Dave Brondsema - 2016-01-25
    • labels: export --> export, sf-4, sf-current
     
  • Denis Kotov

    Denis Kotov - 2016-01-27
    • labels: export, sf-4, sf-current --> export, sf-4, sf-current, 42cc
    • status: open --> in-progress
    • assigned_to: Denis Kotov
     
  • Denis Kotov

    Denis Kotov - 2016-02-01

    almost done. ticket without tests

     
  • Heith Seewald

    Heith Seewald - 2016-03-09
    • status: in-progress --> closed
    • Reviewer: Heith Seewald
     
  • Heith Seewald

    Heith Seewald - 2016-03-09

    merged

     
  • Dave Brondsema

    Dave Brondsema - 2016-04-11
    • Milestone: unreleased --> v1.4.0
     

Log in to post a comment.