SiteScripts/Requests.json

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json",
  "actions": [
    {
      "verb": "createSPList",
      "listName": "Requests",
      "templateType": 1100,
      "subactions": [
        {
          "verb": "addContentType",
          "name": "Issue",
          "id": "0x0103"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{fa564e0f-0c70-4ab9-b863-0177e6ddd247}\" Type=\"Text\" Name=\"Title\" DisplayName=\"Request\" Required=\"TRUE\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"Title\" FromBaseType=\"TRUE\" CustomFormatter=\"\" EnforceUniqueValues=\"FALSE\" Indexed=\"FALSE\" MaxLength=\"255\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{53101f38-dd2e-458c-b245-0c236cc13d1a}\" Type=\"User\" List=\"UserInfo\" Name=\"AssignedTo\" ShowField=\"ImnName\" DisplayName=\"Assigned To\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"AssignedTo\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{3f277a5c-c7ae-4bbe-9d44-0456fb548f94}\" Type=\"Choice\" Name=\"Status\" DisplayName=\"Request Status\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"Status\" EnforceUniqueValues=\"FALSE\" Required=\"TRUE\" Hidden=\"FALSE\" ReadOnly=\"FALSE\" CanToggleHidden=\"FALSE\" Format=\"Dropdown\" FillInChoice=\"FALSE\" Sealed=\"FALSE\" CustomFormatter=\"\" Indexed=\"FALSE\"><Default>Holding</Default><CHOICES><CHOICE>Holding</CHOICE><CHOICE>In-Progress</CHOICE><CHOICE>Completed</CHOICE></CHOICES></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{a8eb573e-9e11-481a-a8c9-1104a54b2fbd}\" Type=\"Choice\" Name=\"Priority\" DisplayName=\"Priority\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"Priority\" CustomFormatter=\"\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" Indexed=\"FALSE\" FillInChoice=\"FALSE\" Format=\"Dropdown\"><CHOICES><CHOICE>H</CHOICE><CHOICE>M</CHOICE><CHOICE>L</CHOICE></CHOICES><Default>L</Default></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{6df9bd52-550e-4a30-bc31-a4366832a87d}\" FromBaseType=\"TRUE\" Type=\"Choice\" Name=\"Category\" DisplayName=\"Category\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"Category\" EnforceUniqueValues=\"FALSE\" Required=\"FALSE\" Hidden=\"FALSE\" ReadOnly=\"FALSE\" CanToggleHidden=\"FALSE\" Format=\"Dropdown\" FillInChoice=\"FALSE\" Sealed=\"FALSE\"><Default>(1) Forms</Default><CHOICES><CHOICE>(1) Forms</CHOICE><CHOICE>(2) Pages</CHOICE><CHOICE>(3) Navigation</CHOICE></CHOICES></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field Type=\"DateTime\" ID=\"{cd21b4c2-6841-4f9e-a23a-738a65f99889}\" Name=\"DueDate\" DisplayName=\"Due Date\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"DueDate\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{6df9bd52-550e-4a30-bc31-a4366832a87e}\" Type=\"Note\" RichText=\"TRUE\" AppendOnly=\"TRUE\" Name=\"V3Comments\" DisplaceOnUpgrade=\"TRUE\" DisplayName=\"Comments\" Sortable=\"FALSE\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"V3Comments\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field Type=\"Number\" DisplayName=\"Est Hours\" Description=\"Rough order of magnitude\" EnforceUniqueValues=\"FALSE\" Required=\"FALSE\" Hidden=\"FALSE\" ReadOnly=\"FALSE\" CanToggleHidden=\"FALSE\" ID=\"{51af7d09-726b-46bf-b547-dccf27ba4e92}\" Name=\"ROM\" StaticName=\"ROM\" Decimals=\"1\" Percentage=\"FALSE\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field Type=\"Note\" DisplayName=\"Dev Notes\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" Indexed=\"FALSE\" NumLines=\"10\" RichText=\"TRUE\" RichTextMode=\"FullHtml\" IsolateStyles=\"TRUE\" Sortable=\"FALSE\" ID=\"{8759ebea-fd2c-4266-8390-1cd5fa91bafb}\" StaticName=\"Dev_x0020_Notes\" Name=\"Dev_x0020_Notes\" />"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field Type=\"Choice\" DisplayName=\"Approved\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" Indexed=\"FALSE\" Format=\"Dropdown\" FillInChoice=\"FALSE\" ID=\"{c0514efb-7bc2-41ba-b9a0-1991adb00659}\" StaticName=\"Approved\" Name=\"Approved\"><Default>Pending Approval</Default><CHOICES><CHOICE>Pending Approval</CHOICE><CHOICE>Yes</CHOICE><CHOICE>No</CHOICE></CHOICES></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{d8a2155a-aaf8-4d38-a14d-52bc83061d05}\" ReadOnly=\"TRUE\" Hidden=\"TRUE\" Type=\"Computed\" Name=\"RemoveRelatedID\" Sortable=\"FALSE\" DisplayName=\"Remove Related ID\" AuthoringInfo=\"(no longer used field rendered link to remove this issue from related issues list)\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"RemoveRelatedID\"><FieldRefs /><DisplayPattern><HTML><![CDATA[Unused]]></HTML></DisplayPattern></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{bc91a437-52e7-49e1-8c4e-4698904b2b6d}\" ReadOnly=\"TRUE\" Type=\"Computed\" Name=\"LinkTitleNoMenu\" DisplayName=\"Request\" Dir=\"\" DisplayNameSrcField=\"Title\" AuthoringInfo=\"(linked to item)\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"LinkTitleNoMenu\" FromBaseType=\"TRUE\"><FieldRefs><FieldRef Name=\"Title\" /><FieldRef Name=\"LinkFilenameNoMenu\" /></FieldRefs><DisplayPattern><IfEqual><Expr1><LookupColumn Name=\"FSObjType\" /></Expr1><Expr2>1</Expr2><Then><Field Name=\"LinkFilenameNoMenu\" /></Then><Else><HTML><![CDATA[<a onfocus=\"OnLink(this)\" href=\"]]></HTML><URL /><HTML><![CDATA[\" onclick=\"GoToLink(this);return false;\" target=\"_self\">]]></HTML><Column HTMLEncode=\"TRUE\" Name=\"Title\" Default=\"(no title)\" /><IfEqual><Expr1><GetVar Name=\"ShowAccessibleIcon\" /></Expr1><Expr2>1</Expr2><Then><HTML><![CDATA[<img src=\"/_layouts/15/images/blank.gif?rev=47\" class=\"ms-hidden\" border=\"0\" width=\"1\" height=\"1\" alt=\"Use SHIFT+ENTER to open the menu (new window).\"/>]]></HTML></Then></IfEqual><HTML><![CDATA[</a>]]></HTML><IfNew><HTML><![CDATA[<img src=\"/_layouts/1033/images/new.gif\" alt=\"]]></HTML><HTML>New</HTML><HTML><![CDATA[\" class=\"ms-newgif\" />]]></HTML></IfNew></Else></IfEqual></DisplayPattern></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{67f6307f-c161-4096-a5a7-b77016c08100}\" ReadOnly=\"TRUE\" Type=\"Computed\" Name=\"LinkTitleVersionNoMenu\" DisplaceOnUpgrade=\"TRUE\" DisplayName=\"Request\" Dir=\"\" DisplayNameSrcField=\"Title\" AuthoringInfo=\"(linked to item version history)\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"LinkTitleVersionNoMenu\" FromBaseType=\"TRUE\"><FieldRefs><FieldRef Name=\"Title\" /><FieldRef Name=\"_UIVersion\" /></FieldRefs><DisplayPattern><HTML><![CDATA[<a onfocus=\"OnLink(this)\" href=\"]]></HTML><URL /><HTML><![CDATA[\" onclick=\"GoToHistoryLink(this,']]></HTML><Column Name=\"_UIVersion\" StripWS=\"TRUE\" URLEncode=\"TRUE\" /><HTML><![CDATA[');return false;\" target=\"_self\">]]></HTML><Column HTMLEncode=\"TRUE\" Name=\"Title\" Default=\"(no title)\" /><HTML><![CDATA[</a>]]></HTML><IfNew><HTML><![CDATA[<img src=\"/_layouts/1033/images/new.gif\" alt=\"]]></HTML><HTML>New</HTML><HTML><![CDATA[\" class=\"ms-newgif\" />]]></HTML></IfNew></DisplayPattern></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{82642ec8-ef9b-478f-acf9-31f7d45fbc31}\" ReadOnly=\"TRUE\" Type=\"Computed\" Name=\"LinkTitle\" DisplayName=\"Request\" DisplayNameSrcField=\"Title\" ClassInfo=\"Menu\" AuthoringInfo=\"(linked to item with edit menu)\" ListItemMenuAllowed=\"Required\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"LinkTitle\" FromBaseType=\"TRUE\"><FieldRefs><FieldRef Name=\"Title\" /><FieldRef Name=\"LinkTitleNoMenu\" /><FieldRef Name=\"_EditMenuTableStart2\" /><FieldRef Name=\"_EditMenuTableEnd\" /></FieldRefs><DisplayPattern><FieldSwitch><Expr><GetVar Name=\"FreeForm\" /></Expr><Case Value=\"TRUE\"><Field Name=\"LinkTitleNoMenu\" /></Case><Default><HTML><![CDATA[<div class=\"ms-vb itx\" onmouseover=\"OnItem(this)\" CTXName=\"ctx]]></HTML><Field Name=\"_EditMenuTableStart2\" /><HTML><![CDATA[\">]]></HTML><Field Name=\"LinkTitleNoMenu\" /><HTML><![CDATA[</div>]]></HTML><HTML><![CDATA[<div class=\"s4-ctx\" onmouseover=\"OnChildItem(this.parentNode); return false;\">]]></HTML><HTML><![CDATA[<span>&nbsp;</span>]]></HTML><HTML><![CDATA[<a onfocus=\"OnChildItem(this.parentNode.parentNode); return false;\" onclick=\"PopMenuFromChevron(event); return false;\" href=\"javascript:;\" title=\"Open Menu\"></a>]]></HTML><HTML><![CDATA[<span>&nbsp;</span>]]></HTML><HTML><![CDATA[</div>]]></HTML></Default></FieldSwitch></DisplayPattern></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{5f190d91-3dbc-4489-9878-3c092caf35b6}\" Hidden=\"TRUE\" ReadOnly=\"TRUE\" Type=\"Computed\" Name=\"LinkTitle2\" DisplayName=\"Request\" DisplayNameSrcField=\"Title\" ClassInfo=\"Menu\" AuthoringInfo=\"(linked to item with edit menu) (old)\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"LinkTitle2\" FromBaseType=\"TRUE\"><FieldRefs><FieldRef Name=\"Title\" /><FieldRef Name=\"LinkTitleNoMenu\" /><FieldRef Name=\"_EditMenuTableStart\" /><FieldRef Name=\"_EditMenuTableEnd\" /></FieldRefs><DisplayPattern><FieldSwitch><Expr><GetVar Name=\"FreeForm\" /></Expr><Case Value=\"TRUE\"><Field Name=\"LinkTitleNoMenu\" /></Case><Default><Field Name=\"_EditMenuTableStart\" /><SetVar Name=\"ShowAccessibleIcon\" Value=\"1\" /><Field Name=\"LinkTitleNoMenu\" /><SetVar Name=\"ShowAccessibleIcon\" Value=\"0\" /><Field Name=\"_EditMenuTableEnd\" /></Default></FieldSwitch></DisplayPattern></Field>"
        },
        {
          "verb": "addSPFieldXml",
          "schemaXml": "<Field ID=\"{03f89857-27c9-4b58-aaab-620647deda9b}\" ReadOnly=\"TRUE\" Type=\"Computed\" Name=\"LinkIssueIDNoMenu\" DisplayName=\"Issue ID\" Dir=\"\" DisplayNameSrcField=\"IssueID\" AuthoringInfo=\"(linked to item)\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"LinkIssueIDNoMenu\"><FieldRefs><FieldRef Name=\"ID\" /></FieldRefs><DisplayPattern><HTML><![CDATA[<a href=\"]]></HTML><URL /><HTML><![CDATA[\" onclick=\"GoToLink(this);return false;\" target=\"_self\">]]></HTML><Column HTMLEncode=\"TRUE\" Name=\"ID\" /><HTML><![CDATA[</a>]]></HTML></DisplayPattern></Field>"
        },
        {
          "verb": "addSPView",
          "name": "All Issues",
          "viewFields": [
            "LinkIssueIDNoMenu",
            "LinkTitle",
            "AssignedTo",
            "Status",
            "Priority",
            "DueDate",
            "ROM"
          ],
          "query": "",
          "rowLimit": 30,
          "isPaged": true,
          "replaceViewFields": true
        },
        {
          "verb": "addSPView",
          "name": "My Issues",
          "viewFields": [
            "LinkIssueIDNoMenu",
            "LinkTitle",
            "Status",
            "Priority",
            "DueDate"
          ],
          "query": "<Where><Eq><FieldRef Name=\"AssignedTo\" /><Value Type=\"\"><UserID /></Value></Eq></Where><OrderBy><FieldRef Name=\"ID\" /></OrderBy>",
          "rowLimit": 30,
          "isPaged": true,
          "replaceViewFields": true
        },
        {
          "verb": "addSPView",
          "name": "Active Issues",
          "viewFields": [
            "Edit",
            "Approved",
            "Priority",
            "Title",
            "ROM",
            "Status",
            "DueDate",
            "AssignedTo",
            "Editor"
          ],
          "query": "<OrderBy><FieldRef Name=\"ID\" /></OrderBy><Where><Neq><FieldRef Name=\"Status\" /><Value Type=\"Text\">Closed</Value></Neq></Where>",
          "rowLimit": 30,
          "isPaged": true,
          "makeDefault": true,
          "replaceViewFields": true
        }
      ]
    }
  ]
}