Defekte in GroupShare 2020 with handling of segmentation rules

Hello SDL developers,

we are currently working on migrating our groupshare installation. We developed years ago an application to migrate TMs with all its settings: segmentations rules. variables, ordinal followers and abbreviations. This worked in the past, but not for the migration to GS2020: we have a problem with the segmentation rules.

here a code snippet to explain the problem:

//create a default provider to get the standard values
DefaultLanguageResourceProvider defaultLangResProvider = new DefaultLanguageResourceProvider();
LanguageResourceBundle defaultLg = defaultLangResProvider.GetDefaultLanguageResources(CultureInfo.GetCultureInfo("de-AT"));
LanguageResourceBundle newTemplateLangResBundle = new LanguageResourceBundle(CultureInfo.GetCultureInfo("de-AT"));
// add variables
newTemplateLangResBundle.Variables = new Wordlist();
newTemplateLangResBundle.Variables.Add("test");
// add ordinal followers
newTemplateLangResBundle.OrdinalFollowers = defaultLg.OrdinalFollowers;
newTemplateLangResBundle.OrdinalFollowers.Add("test.");
// add abbreviations
newTemplateLangResBundle.Abbreviations = defaultLg.Abbreviations;
newTemplateLangResBundle.Abbreviations.Add("test.");
// add segmentation rules
newTemplateLangResBundle.SegmentationRules = defaultLg.SegmentationRules; // <<<------
serverLangResTemplate.LanguageResourceBundles.Add(newTemplateLangResBundle);
serverLangResTemplate.Save();

The code line marked with <<<------ is not working. I get an error message: 500 (Internal Server Error).
If I remove this line, the language resource is saved properly and the 3 standard segmentation rules are set in the segmentation rules list.

This means that I have no possiblity to change the segmentation rules or delete them to have a paragraph based segmentation. I always get the internal server error.


The problem seems to be larger as the UI currently doesn't allow to change the segmentation rules properly. Maybe the 2 problems are linked together.

Can you check this problem and correct my code if I missed something?

Kind regards

Sébastien