Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure a proper DiscussionBoard List creation #834

Closed
SubPointSupport opened this issue May 17, 2016 · 2 comments
Closed

Ensure a proper DiscussionBoard List creation #834

SubPointSupport opened this issue May 17, 2016 · 2 comments

Comments

@SubPointSupport
Copy link
Contributor

Seems that discussion bord list created programmatically lacks some configuration. Needs to be investigated.

How to enable Likes in Default DiscussionBoard List with SPMeta2 CSOM?
var list = new ListDefinition
{
CustomUrl = string.Format("Lists/{0}", listUrl),
Title = listName,
TemplateType = BuiltInListTemplateTypeId.DiscussionBoard,
OnQuickLaunch = false,
ContentTypesEnabled = true,
EnableAttachments = true
};
var ratingsEnabled = new PropertyDefinition
{
Key = "Ratings_VotingExperience",
Value = "Likes",
Overwrite = true
};
var model = SPMeta2Model.NewWebModel(webNode =>
{
webNode.AddList(list, listNode =>
{
listNode.AddProperty(ratingsEnabled);
});
});
var povisionService = new CSOMProvisionService();
povisionService.DeployWebModel(context, model);

After creating a list through SPMeta2, no relevant columns.

https://www.yammer.com/spmeta2feedback/?trk_event=dd_viewmorecta_click#/home?trk_event=dd_viewmorecta_click

@SubPointSupport
Copy link
Contributor Author

Moved to #840

@SubPointSupport
Copy link
Contributor Author

SubPointSupport commented Aug 1, 2016

Works as expected. Added two more tests:

  • CanDeploy_DiscussionBoard_By_TemplateName
  • CanDeploy_DiscussionBoard_By_TemplateType

Voting experience has nothing to do with actual list creation process. Setting up "Ratings_VotingExperience" property bag value to "Likes" is not enough as all the required fields have to be added manually. Further architectural guides or suggestions are out of the current ticket.

Should the correct and working example of the desired behavior in C# be available, we more than happy to guide the M2 implementation/port.

Closing the ticket.

SubPointSupport added a commit that referenced this issue Aug 1, 2016
+ added two more tests:
* CanDeploy_DiscussionBoard_By_TemplateName
* CanDeploy_DiscussionBoard_By_TemplateType
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant