06-23-2022 07:40 AM - edited 06-23-2022 07:51 AM
Hello Jamf Nation,
We've built our own type of semi-automated software updates method in our JAMF Pro instance using Autopkgr.
We've altered the recipes and templates to tailor our needs. Utilizing Autopkgr in conjunction with JAMF API has been extremely helpful.
There is one issue we are having and I'm not sure if this is necessarily the correct place to ask for advice for this. But in the policies we run in AutoPkgr, we want AutoPkgr to automatically enable notifications for the policy in the Self Service Portal. For whatever reason, we can't figure this out and get it to work correctly. We've checked in the JAMF Classic API to see how it should be coded in the policy but it still doesn't seem to work. I'll post an example of one of our policy template's we use with our Autopkgr recipes and highlight the portion that's not working. Any assistance would be appreciated.
<policy>
<general>
<name>Updates - %NAME_TWO%</name>
<enabled>true</enabled>
<frequency>Ongoing</frequency>
<category>
<name>Updates</name>
</category>
<site>
<id>1</id>
<name>Headquarters</name>
</site>
</general>
<scope>
<!--Scope added by JSSImporter-->
</scope>
<package_configuration>
<!--Package added by JSSImporter-->
</package_configuration>
<scripts>
<size>2</size>
<script>
<id>80</id>
<name>Open Application</name>
<priority>After</priority>
<parameter4>%NAME_TWO%.app</parameter4>
<parameter5/>
<parameter6/>
<parameter7/>
<parameter8/>
<parameter9/>
<parameter10/>
<parameter11/>
</script>
<script>
<id>79</id>
<name>Quit Application</name>
<priority>Before</priority>
<parameter4>%NAME_TWO%</parameter4>
<parameter5/>
<parameter6/>
<parameter7/>
<parameter8/>
<parameter9/>
<parameter10/>
<parameter11/>
</script>
<!--Scripts added by JSSImporter-->
</scripts>
<self_service>
<use_for_self_service>true</use_for_self_service>
<self_service_display_name>%NAME_TWO%</self_service_display_name>
<install_button_text>Update</install_button_text>
<reinstall_button_text>Update</reinstall_button_text>
<self_service_description>%SELF_SERVICE_DESCRIPTION% Version: %VERSION%</self_service_description>
<force_users_to_view_description>true</force_users_to_view_description>
<feature_on_main_page>false</feature_on_main_page>
<self_service_categories>
<category>
<name>Updates</name>
<display_in>true</display_in>
<feature_in>true</feature_in>
</category>
</self_service_categories>
<notification>true</notification>
<notification>Self Service and Notification Center</notification>
<notification_subject>%NAME_TWO% Update</notification_subject>
<notification_message>A %NAME_TWO% update is available.</notification_message>
</self_service>
<maintenance>
<recon>true</recon>
</maintenance>
</policy>
The specific portion of the policy template/script that isn't working, which matches exactly how it looks in the JAMF Classic API, is provided below.
<notification>true</notification>
I've even changed it to have 1 instead of true and it still didn't work. Not sure why it will not enable notifications in the JAMF policy. It updates the notification subject, and message but will not turn them on.
Does anyone have any ideas? If clarification is needed let me know.
06-23-2022 09:13 AM - edited 06-23-2022 09:14 AM
You might want to ask this exact same question in the macadmins Slack channel for #autopkg - the creators & power users hang out there pretty much all the time.