-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
area:site-designCategory: Site Designs/Site ScriptsCategory: Site Designs/Site Scriptstype:archive-old-issueIssues which are closed as tool old for active workIssues which are closed as tool old for active worktype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Description
Category
- Question
- Typo
- Bug
- Additional article idea
Expected or Desired Behavior
We'd like to be able to set up view which are grouped by Content Type and are collapsed by default. So we use some JSON like this:
{
"verb": "addSPView",
"name": "New View",
"viewFields": [
"ContentType",
"DocIcon",
"LinkFilename",
"ReportDate",
"Modified",
"Editor"
],
"query": "<OrderBy><FieldRef Name=\"FileLeafRef\" /></OrderBy><GroupBy Collapse='TRUE'><FieldRef Name=\"ContentType\" Ascending=\"TRUE\" /></GroupBy>",
"rowLimit": 30,
"isPaged": true,
"makeDefault": true
}Observed Behavior
The resulting view when we apply the Site Design which reference the Site Script snippet from above is grouped by Content Type, but it displays the ContentTypeId rather than the Content Type name.
Using the SPInsider Chrome extension, I can see the resulting ViewXML is correct:
<OrderBy><FieldRef Name=\"FileLeafRef\" /></OrderBy><GroupBy Collapse='TRUE'><FieldRef Name=\"ContentType\" Ascending=\"TRUE\" /></GroupBy>If we don't add Collapse='TRUE', the Content Type name is shown correctly.
Steps to Reproduce
Use the JSON snippet above to add a new view to a list or library with or without the Collapse='TRUE' setting.
Metadata
Metadata
Assignees
Labels
area:site-designCategory: Site Designs/Site ScriptsCategory: Site Designs/Site Scriptstype:archive-old-issueIssues which are closed as tool old for active workIssues which are closed as tool old for active worktype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

