-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 7.13.8, 7.20.3, 7.19.18, 8.5.6
-
Component/s: Apps - Team Calendar
-
None
-
2
-
Severity 3 - Minor
-
0
Issue Summary
When importing a .ics Calendar that was Exported from Confluence site, attendees are not matched properly when Importing the Calendar on a different Confluence instance.
This is reproducible on Data Center: yes
Steps to Reproduce
- Confluence Source
- Browse to your Calendar tab, and use Export to iCalendar to export a calendar with at least one Attendee in the events
- Confluence Destination
- Ensure the Attendee is a user from the new Confluence instance
- Browse to your Calendars tab, and use Import Calendar
- In the new prompt, select the ics created before in field Upload iCal
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.
The import is only mapping the "X-CONFLUENCE-USER-KEY" part of the Attendee in the .ics:
ATTENDEE;X-CONFLUENCE-USER-KEY=2cb280858d9d05c1018d9d096fef0000;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 SOURCE to DESTINATION
- Create database dump of the list of users of each site. Using Postgres, this would be as follows:
psql confluence COPY user_mapping(username, user_key) TO '/tmp/usermappingSOURCE.csv' DELIMITERS E'\t' CSV;
Repeat the same in the DESTINATION database.
Files will look like:username1 ff80808142c21f330142c2215dd20004 username2 ff80808142c21f330142c2215dd20013 ...
- Download them to the same location and name them accordingly: "usermappingSOURCE.csv" "usermappingDEST.csv"
- Create a replacement list: (command explained: here)
awk 'NR==FNR {h[$1] = $2; next} {print $2,$3,h[$1]}' usermappingDEST.csv usermappingSOURCE.csv > replaceUSERS.csv - Remove lines from replaceUSERS.csv that don't have a second value. (That means that the user doesn't exist on DESTINATION)
awk 'NF > 1' replaceUSERS.csv > replaceMATCHEDUSERS.csv - Export the calendar/s from SOURCE and replace all keys dynamically on the .ics using the replaceMATCHEDUSERS.csv file: (command explained here)
while read n k; do sed -i "s/$n/$k/g" calendar.ics; done < replaceMATCHEDUSERS.csv
- Import the modified calendar.ics in DESTINATION
If the user_key in the ICS event does not exist in Confluence at the time of the import, then the "AO_950DC3_TC_EVENTS_INVITEES" table will not be populated (i.e. the user association will be permanently lost, unrecoverable even if the user_key is manually formed later).
- is cloned from
-
CONFSERVER-48865 Attendees are not imported to a different Confluence site
-
- Closed
-