{"action":"created","issue":{"url":"https://api.github.com/repos/jssimporter/JSSImporter/issues/130","repository_url":"https://api.github.com/repos/jssimporter/JSSImporter","labels_url":"https://api.github.com/repos/jssimporter/JSSImporter/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/jssimporter/JSSImporter/issues/130/comments","events_url":"https://api.github.com/repos/jssimporter/JSSImporter/issues/130/events","html_url":"https://github.com/jssimporter/JSSImporter/issues/130","id":297129406,"node_id":"MDU6SXNzdWUyOTcxMjk0MDY=","number":130,"title":"Not possible to provide parameter values for scripts that are to be uploaded","user":{"login":"grahampugh","id":5802725,"node_id":"MDQ6VXNlcjU4MDI3MjU=","avatar_url":"https://avatars1.githubusercontent.com/u/5802725?v=4","gravatar_id":"","url":"https://api.github.com/users/grahampugh","html_url":"https://github.com/grahampugh","followers_url":"https://api.github.com/users/grahampugh/followers","following_url":"https://api.github.com/users/grahampugh/following{/other_user}","gists_url":"https://api.github.com/users/grahampugh/gists{/gist_id}","starred_url":"https://api.github.com/users/grahampugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grahampugh/subscriptions","organizations_url":"https://api.github.com/users/grahampugh/orgs","repos_url":"https://api.github.com/users/grahampugh/repos","events_url":"https://api.github.com/users/grahampugh/events{/privacy}","received_events_url":"https://api.github.com/users/grahampugh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-14T15:07:52Z","updated_at":"2018-06-25T17:10:51Z","closed_at":null,"author_association":"NONE","body":"There appears to be no means of providing a parameter value for a script that is included in a policy. \r\nThe `<parameters></parameters>` section of a Script Template provides the opportunity to alter the display name of each parameter, but there's no means of inputting a value to the parameters.\r\n\r\nIf a Policy Template is edited, so that the parameter value can be included, this adds another script entry to the policy in addition to the one added due to the presence of a Script Template. This would result in the script running twice, once without the parameter value and once with.\r\n\r\nIt should be possible to provide both parameter display names to scripts and parameter values to script entries of policies."},"comment":{"url":"https://api.github.com/repos/jssimporter/JSSImporter/issues/comments/400026500","html_url":"https://github.com/jssimporter/JSSImporter/issues/130#issuecomment-400026500","issue_url":"https://api.github.com/repos/jssimporter/JSSImporter/issues/130","id":400026500,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDAyNjUwMA==","user":{"login":"grahampugh","id":5802725,"node_id":"MDQ6VXNlcjU4MDI3MjU=","avatar_url":"https://avatars1.githubusercontent.com/u/5802725?v=4","gravatar_id":"","url":"https://api.github.com/users/grahampugh","html_url":"https://github.com/grahampugh","followers_url":"https://api.github.com/users/grahampugh/followers","following_url":"https://api.github.com/users/grahampugh/following{/other_user}","gists_url":"https://api.github.com/users/grahampugh/gists{/gist_id}","starred_url":"https://api.github.com/users/grahampugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grahampugh/subscriptions","organizations_url":"https://api.github.com/users/grahampugh/orgs","repos_url":"https://api.github.com/users/grahampugh/repos","events_url":"https://api.github.com/users/grahampugh/events{/privacy}","received_events_url":"https://api.github.com/users/grahampugh/received_events","type":"User","site_admin":false},"created_at":"2018-06-25T17:10:51Z","updated_at":"2018-06-25T17:10:51Z","author_association":"NONE","body":"Revisiting this issue as it's still a problem.\r\n\r\nIt doesn't appear to be possible to add a script AND have the `parameter4` value filled in in the policy.\r\n\r\nGiven this script template:\r\n\r\n```        <script>\r\n            <name>Prism 7-postinstall.sh</name>\r\n            <category>Science &amp; Math</category>\r\n            <filename>Prism 7-postinstall.sh</filename>\r\n            <parameter4>%license_key%</parameter4>\r\n            <priority>After</priority>\r\n        </script>\r\n```\r\n\r\nIf you put this in the `PolicyTemplate.xml`, `parameter4` is filled in as it should be, but the policy will fail to run if the script is not already present in the JSS.\r\n\r\nIf you put the same XML in a `ScriptTemplate.xml`, `parameter4` is ignored (and you can't pass a variable into it). \r\n\r\nYou can add the following in the `ScriptTemplate.xml`, but this creates a label for the script itself, not for the policy:\r\n```    <parameters>\r\n               <parameter4>Some Value</parameter4>\r\n          </parameters>\r\n```\r\n\r\nIf you add a ScriptTemplate.xml AND have the script stuff in the PolicyTemplate.xml, the script is uploaded, but it is added twice to the policy, once without the parameter4 and once with. \r\n\r\nSo, how does one upload a script AND provide parameter values (not labels) in the same JSS run?"}}
{"actor":{"display_login":"grahampugh"}}