dan-snelson / dialog-scripts

Scripts with leverage Bart Reardon's swiftDialog
MIT License
110 stars 35 forks source link

Additional Field Inputs #1

Closed remusache closed 1 year ago

remusache commented 2 years ago

Is there a chance we could have the possibility to add, in addition to the Asset Tag, more stuff like: Computer Name, Location (City) etc?

dan-snelson commented 2 years ago

Need to review Selectable-List.bash

dan-snelson commented 2 years ago

Happy Friday, @remusache.

Screen Shot 2022-07-29 at 9 38 50 AM Screen Shot 2022-07-29 at 9 38 34 AM

I think I have a pretty good idea what to do with the user's input for:

Please advise what you have in mind for the user's input of Location (City).

remusache commented 2 years ago

Hello Dan!

Thank you so very much for taking the time to help me out. We've been using the DEPNotify-Starter for awhile now and it's been working great, but the first time I saw your work with the Setup-Your-Mac-via-Dialog.bash - I fell in love with it. It's simply amazing!

I would like to keep the same automation as with the DEPNotify script, meaning that the Setup-Your-Mac-via-Dialog script should start automatically after Enrolment Complete (definitely not during)… Maybe put a check for "odd-ball users are logged in" like you have in Prompt-to-Setup-Your-Mac and only start after maybe Setup Assistant is NOT running anymore or if Finder is running or something… :)

This is what I'm thinking for: Computer Name (Datornamn) Asset Tag (Stöldmärkning) Location/City (Placeringsort)

Screenshot 2022-07-29 at 18 26 51

Once again thank you so much for your help and your amazing work with the script!

Have an awesome week-end! Kind Regardss Remus

dan-snelson commented 2 years ago

Thanks for the additional details (and the kind words).

Are “Enrollment Complete” polices working reliably for you?

We purposely went the “Setup Your Mac” route due to Jamf Pro Known Issues PI100009 - PI-004775 and didn’t need to check for a logged-in user. (I can easily add the check for “odd-ball” users.)

Will Location be read by an Extension Attribute, or is it what I currently have labeled as Department ?

remusache commented 2 years ago

I have not experienced any issues with the "Enrollment Complete" policies… so far so good! No Extension Attribute for Location. It is like you currently have it for Department.

dan-snelson commented 2 years ago

Thanks for your patience, @remusache, but I'm not sure when I'll get to this.

drtaru commented 1 year ago

Good afternoon, this is exactly what I am looking for to make the switch from DEPNotify to SwiftDialog! Ideally we could turn on/off fields we don't need, for example my org doesn't use Asset Tag or Location but we do set the Computer Name and Department for all new machines.

drtaru commented 1 year ago

I'd like to add, I'd be happy to help with the function scripting on this, however my knowledge of swiftDialog is nil. @dan-snelson if you would be willing to add the additional inputs and dropdown code and parse that into variables I'd be happy to write the necessary code for taking those values and doing the jamf specific work to update the computer record within the script.

dan-snelson commented 1 year ago

Thanks for sharing your user-story, @drtaru.

As mentioned on Slack, Pull Requests are welcome — especially feature-complete PRs.

(Finding cycles to custom-code features we won't use is challenging.)

midiman1000 commented 1 year ago

Hello, and love the work and tips btw.I'm using your Setup Your Mac via swiftDialog (1.2.7), and I'm testing it right now to replace the DEPNotify script.This is a little nicer for the EU's and the green checkboxes will go a long way for lettings users see the progress.Q1: You have the asset tag info which is great, and I have many of my own workflows to acquire asset tag, dept, and computerNames, but did not want to start doctoring this script if I do not have to, my question is: Is it possible to add dept, and computerName in the process? A simple recon -department and setComputerName could do it, just thought I'd ask as we use Okta and this would tie nicely with that info to register in JAMF. Thank you again and love the work.

midiman1000 commented 1 year ago

The pic above is what I'd like: Happy Friday, @remusache.... That screen shot looks perfect.

erikmadams commented 1 year ago

@dan-snelson Thank you for the slack info you have provided me over the last couple of days. I would love to have this feature available ASAP. We do all of our smart grouping in Jamf using the computer name criteria so before I fully move from DEPNotify to SwiftDialog I need to have that computer name field and recon up and running. It would be great to have the option to use all of the user and location information in this script.

Computer name along with: Department Building Room

Maybe a way to leave the info blank or true/false variable to turn on and off the information we need the user to input. Thank you again for this amazing script.

dan-snelson commented 1 year ago

Thanks for your patience, @remusache, please test-drive v1.3.2 RC1.

Screenshot 2022-11-21 at 3 00 27 AM
midiman1000 commented 1 year ago

Cool, this is great, I worked with drtaru on the other project and I added my own company attributes and it’s working great.

But this is really nice too, and will scope and test this week.

Thanks for all the hard work everyone.

John J Stevens @.**@.> 469-563-6538 https://www.linkedin.com/in/john-stevens-itspecialist

From: "Dan K. Snelson" @.> Reply-To: dan-snelson/dialog-scripts @.> Date: Monday, November 21, 2022 at 4:10 AM To: dan-snelson/dialog-scripts @.> Cc: John Stevens @.>, Comment @.***> Subject: Re: [dan-snelson/dialog-scripts] Additional Field Inputs (Issue #1)

Thanks for your patience, @remusachehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fremusache&data=05%7C01%7C%7C2ff64556972e418358d308dacba89fc0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638046222340136883%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=dHeASVOHRBlfQegRas6x8zrIsS8dF%2FIkIk88x6Y4gk4%3D&reserved=0, please test-drive v1.3.2 RC1https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdan-snelson%2Fdialog-scripts%2Fblob%2Fv1.3.2-rc%2FSetup%2520Your%2520Mac%2FSetup-Your-Mac-via-Dialog.bash&data=05%7C01%7C%7C2ff64556972e418358d308dacba89fc0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638046222340292674%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VRRnmdXY305DpeUEf1uxDYwO%2FQSCFigv91Rm%2BiZTxRM%3D&reserved=0.

[Screenshot 2022-11-21 at 3 00 27 AM]https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F24623109%2F203023731-c6913627-982b-4796-9c83-8d920e23469f.png&data=05%7C01%7C%7C2ff64556972e418358d308dacba89fc0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638046222340292674%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ij2Wy%2FZewGYgU76aWGo7LmlgbJZsSRmy4xrPCKEDPRc%3D&reserved=0

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdan-snelson%2Fdialog-scripts%2Fissues%2F1%23issuecomment-1321811385&data=05%7C01%7C%7C2ff64556972e418358d308dacba89fc0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638046222340292674%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=HKzw6n9VoJyn9juW1vR76wTYLaVwLUupf9nqm3Chv8A%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI44YY3RMCH3ZDMENKDITE3WJNDBPANCNFSM544JL5DQ&data=05%7C01%7C%7C2ff64556972e418358d308dacba89fc0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638046222340292674%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=wZSJAd%2BA4lQ0GIaRCjaz%2BP5mFP2Iwvhv1Ny4m8%2B0kpI%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

aldobalducci commented 1 year ago

how do I get the code to do extra fields like computer name, username, asset - that would be super helpful. I don't need drop down boxes.

dan-snelson commented 1 year ago

Greetings, @aldobalducci!

Setup Your Mac, 1.5.0-rc1 is available here.

aldobalducci commented 1 year ago

amazing thanks

On 24 Nov 2022, at 12:41 pm, Dan K. Snelson @.***> wrote:

Greetings, @aldobalducci https://github.com/aldobalducci!

Setup Your Mac, 1.5.0-rc1 is available here https://github.com/dan-snelson/dialog-scripts/tree/v1.5.0-rc/Setup%20Your%20Mac.

— Reply to this email directly, view it on GitHub https://github.com/dan-snelson/dialog-scripts/issues/1#issuecomment-1325841533, or unsubscribe https://github.com/notifications/unsubscribe-auth/AITKVI5BR2HPNLKK6BXVX4LWJ3BS7ANCNFSM544JL5DQ. You are receiving this because you were mentioned.

aldobalducci commented 1 year ago

the asset tag isn't being written back to Jamf.. the old script did, not sure what's change here.

drtaru commented 1 year ago

@aldobalducci are you in the Mac Admins Slack at all?

I’d be happy to take a look at your current implementation and see if I can figure out your issue. You can DM me on there under the same username as here.

dan-snelson commented 1 year ago

Thanks for reporting this, @aldobalducci; I'll take a look.

dan-snelson commented 1 year ago

@aldobalducci:

Thanks again for reporting this issue; this should be resolved in 1.5.0-rc3.

Please test and advise.

dan-snelson commented 1 year ago

Resolved in v1.5.0. (Thanks for your patience.)

aldobalducci commented 1 year ago

Amazing, thanks.

On 28 Nov 2022, at 11:21 pm, Dan K. Snelson @.***> wrote:

Resolved in v1.5.0. (Thanks for your patience https://snelson.us/2022/11/setup-your-mac-via-swiftdialog-1-5-0/#yoyo-code.)

— Reply to this email directly, view it on GitHub https://github.com/dan-snelson/dialog-scripts/issues/1#issuecomment-1328986346, or unsubscribe https://github.com/notifications/unsubscribe-auth/AITKVI4IPV2I7Z6SEEJC7GDWKSPWLANCNFSM544JL5DQ. You are receiving this because you were mentioned.

aldobalducci commented 1 year ago

Hi Dan, When running it in Jamf as an enrollment complete trigger, I am getting the following error. Script result: id: : no such user 2022-11-30 14:19:20 - Created log file via script No user logged-in; exiting. 2022-11-30 14:19:20 - Exiting … 2022-11-30 14:19:20 - De-caffeinate … 2022-11-30 14:19:20 - The 'caffeinate' process isn't running. 2022-11-30 14:19:20 - Removing /var/tmp/dialogWelcome.wOi … 2022-11-30 14:19:20 - Removing /var/tmp/dialogSetupYourMac.wkd … 2022-11-30 14:19:20 - Removing /var/tmp/dialogFailure.ogb … 2022-11-30 14:19:20 - Executing Completion Action Option: 'Restart' … 2022-11-30 14:19:20 - Restart sans user interaction 2022-11-30 14:19:20 - The 'Self Service' process isn't running.

It runs if I create a self service icon, but im trying to get this ready to roll our for our new year 7 students next year. And would like it on enrollment complete if that’s possible.

On 28 Nov 2022, at 11:21 pm, Dan K. Snelson @.***> wrote:

Closed #1 https://github.com/dan-snelson/dialog-scripts/issues/1 as completed.

— Reply to this email directly, view it on GitHub https://github.com/dan-snelson/dialog-scripts/issues/1#event-7902402434, or unsubscribe https://github.com/notifications/unsubscribe-auth/AITKVI4IPV2I7Z6SEEJC7GDWKSPWLANCNFSM544JL5DQ. You are receiving this because you were mentioned.

dan-snelson commented 1 year ago

@aldobalducci:

As mentioned in the Implementation section:

Setup Your Mac is designed to be executed via a Jamf Pro Self Service policy.

You may wish to post your question on the Mac Admins Slack #swiftdialog Channel.