Attendees are not imported to a different Confluence site

XMLWordPrintable

    • 3
    • Severity 3 - Minor
    • 1

      Summary

      When importing a .ics Calendar that was Exported from Confluence site, attendees are not imported when Importing the Calendar on a different Confluence site.

      Environment

      • .ics export generated from Confluence TeamCalendars
      • Destination site contains the same usernames.

      Steps to Reproduce

      1. Export from site X a calendar with at least one event with an Attendee.
      2. Import the calendar on a different Confluence site where that Attendee is a Confluence user.

      Expected Results

      Team Calendars will match the username during import and add the user as attendee to the event.

      Actual Results

      Imported Calendar doesn't show attendees for the events.

      Cause

      The import is only mapping the "X-CONFLUENCE-USER-KEY" part of the Attendee in the .ics:

      ATTENDEE;X-CONFLUENCE-USER-KEY=ff808081502647c8015064ba7d5e0005;CN=test.username;CUTYPE=INDIVIDUAL:mailto:noreplay@example.com
      

      If it doesn't exist, it doesn't attempt to match with the CN.

      Workaround:

      Manually change the X-CONFLUENCE-USER-KEY in the Exported Calendar to match the new site values (requires DB access):
      Instructions when migrating from A to B

      1. Create database dump of the list of users of each site. Using Postgres would be:
        psql confluence
        copy user_mapping(username, user_key) to '/tmp/usermapping.csv' delimiters E'\t' CSV;
        

        Files will look like:

        user1        ff80808142c21f330142c2215dd20004
        username2        ff80808142c21f330142c2215dd20013
        ...
        
      2. Download them to the same location and name them accordingly: "usermappingA.csv" "usermappingB.csv"
      3. Create a replacement list: (command explained: here)
        awk 'NR==FNR {h[$1] = $2; next} {print $2,$3,h[$1]}' usermappingB.csv usermappingA.csv  > replace.csv
        
      4. Manually remove lines from replace.csv that don't have a second parameter. (That means that the user doesn't exist on B)
      5. Export the calendar/s from A and replace all keys dynamically on the .ics using the replace.csv file: (command explained here)
        while read n k; do sed -i "s/$n/$k/g" calendar.ics; done < replace.csv
        
      6. Import Calendar in B

            Assignee:
            Unassigned
            Reporter:
            Mauro Badii (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: