-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
None
-
Affects Version/s: 5.3.16, 5.3.8
-
Component/s: Apps - Team Calendar
-
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
- Export from site X a calendar with at least one event with an Attendee.
- 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
- 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 ...
- Download them to the same location and name them accordingly: "usermappingA.csv" "usermappingB.csv"
- 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 - Manually remove lines from replace.csv that don't have a second parameter. (That means that the user doesn't exist on B)
- 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
- Import Calendar in B
- was cloned as
-
CONFSERVER-94489 Importing a Team Calendar in a new Confluence instance does not match Attendees
-
- Gathering Impact
-