Allow specifying a term mapping that can be applied during page transformation
Morning @jansenbe ,
I can look to build this?
I'm thinking in terms of spec:
Have i missed anything? Or was there something you envisaged in this feature?
Hey @pkbullock ,
Sure, would be great if you could work on this! I'm also able to spend some cycles on this, but feel free to own this feature.
Your list already is fairly complete, the only thing I was thinking of some kind of auto mapping which is on by default. Looking at your high level spec:
Mapping model
96c933ac-3698-44c7-9f4a-5fd17d71af9e,6142d2a0-63a5-4ba0-aede-d9fefca2c767
souregroup|sourcetermset|sourceterm|sourceterm,targetgroup|targettermset|targetterm
Onprem vs Online
Auto mapping
If customers have already migrated their taxonomy data then they could have done this in 2 ways: they could have kept the same id's or they could have generated new id's. If the same id's are kept then we can automatically map source to target. The same applies for the same termgroup, termset and termnames....if we can find the needed term by following the "path" then we can auto map.
Term stores
For the source we either use the global termstore or the site collection termstore of the source site, for the target we do the same: global SPO termstore of the site collection termstore of the target site
Performance
Taxonomy API's are not the fastest, so it's important that we cache both source and target termset's whenever we encounter them the first time. As we can't cache SPO objects (so objects inheriting from ClientObject) I propose to cache as follows:
TermSet replication tools
Having a script, or a pointer to an existing PnP PowerShell script for this would be nice.
Cool, sounds good, similar pattern as the other mapping features. 馃槉
@jansenbe I'm working through this one and plan for a another coding push tonight, but its not looking likely to be in the Feb release, is that an issue?
np, Feb release is almost out :-) Better to have this in early for the March release so we've a couple weeks test exposure. Thanks for the work on this!
@jansenbe for cases where the source taxonomy field is single and target tax field is set to allow multiple values, ill skip the field form transform and display warning in log. that ok?
Why would you do that? A single value can fit into a multi value field...the opposite flow however can pose a problem
lol brain to github comment fail... thanks for the feedback - i was thinking about multi to single, the potential data loss so will block and report back to user. You have highlighted another scenario i believe the code does not yet support is the single-to-multi, making sure that scenario is working.
Update to development on this, taxonomy mapping now working for publishing pages SPO cross-site and converted page from on-premise (2013), worked fine first time. I will look at enabling this for wiki/web part pages but should be quicker as the code is similar, then submit a PR soon aim for end of month.
Flagging this one as implemented now that the first PR got merged. Thanks a ton for the great work here @pkbullock !!