jamf / mut

MIT License
133 stars 11 forks source link

Remove values en masse #10

Closed clbragdon closed 6 years ago

clbragdon commented 6 years ago

I currently am not able to remove values from JSS. I want to remove values from the Position field and I have followed the instructions in your document carefully but I still can not remove the values. I can add a different value but can not clear the value to a blank. Suggestions?? I have made sure that the column has a header even though it is blank, but no luck.

mike-levenick commented 6 years ago

What is not allowing you to? Does it error out, or does it appear to run but not update? What is the behavior that you’re seeing?

Also, if you’re interested, would you mind posting your CSV for me to test with?

What version are you on?

On Wed, Oct 25, 2017 at 1:53 PM clbragdon notifications@github.com wrote:

I currently am not able to remove values from JSS. I want to remove values from the Position field and I have followed the instructions in your document carefully but I still can not remove the values. I can add a different value but can not clear the value to a blank. Suggestions?? I have made sure that the column has a header even though it is blank, but no luck.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mike-levenick/mut/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AL7416dHwLThDTNPejZvfRmsoMLTt9L-ks5sv4OOgaJpZM4QGfD2 .

clbragdon commented 6 years ago

Mike,

Thanks for your quick response!!

The MUT appears to run but does not update the attribute.

I can change the

I am on version 3.6 and I am using a Windows .csv for the file. I tried doing the import with the previous version, 3.5.x, and had the same issue. I thought perhaps the new version would address the issue.

I have attached the file that I am using. This file is only for a portion of my devices. Those particular devices have a totally incorrect value in Position and I am trying to clear it. I can Import any other value, I just not clear it to be blank.

Thanks for your help!

Cinda-Lee Bragdon MLTI Tech Lead Gray-New Gloucester High School 10 Libby Hill Road Gray ME 04039 207-657-9328 Email: cbragdon@sad15.org

On Wed, Oct 25, 2017 at 3:00 PM, Mike Levenick notifications@github.com wrote:

What is not allowing you to? Does it error out, or does it appear to run but not update? What is the behavior that you’re seeing?

Also, if you’re interested, would you mind posting your CSV for me to test with?

What version are you on?

On Wed, Oct 25, 2017 at 1:53 PM clbragdon notifications@github.com wrote:

I currently am not able to remove values from JSS. I want to remove values from the Position field and I have followed the instructions in your document carefully but I still can not remove the values. I can add a different value but can not clear the value to a blank. Suggestions?? I have made sure that the column has a header even though it is blank, but no luck.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mike-levenick/mut/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/ AL7416dHwLThDTNPejZvfRmsoMLTt9L-ks5sv4OOgaJpZM4QGfD2 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mike-levenick/mut/issues/10#issuecomment-339436049, or mute the thread https://github.com/notifications/unsubscribe-auth/AfkXZnnB_rkRNCKUbxIMnvIsND8vFrg2ks5sv4VTgaJpZM4QGfD2 .

mike-levenick commented 6 years ago

For my curiosity, in a very small run group as a test, could you try blanking our username or asset tag to see if that behaves?

I’ll do some testing either this evening or over the weekend and see what I can find out about position.

What version of jamf pro are you running?

clbragdon commented 6 years ago

Mike,

I did a group of three devices and I was able to blank out the UserName and then the Asset Tag for each of them.

We are running JAMF 9.101.0

Cinda-Lee Bragdon MLTI Tech Lead Gray-New Gloucester High School 10 Libby Hill Road Gray ME 04039 207-657-9328 Email: cbragdon@sad15.org

On Thu, Oct 26, 2017 at 11:51 AM, Mike Levenick notifications@github.com wrote:

For my curiosity, in a very small run group as a test, could you try blanking our username or asset tag to see if that behaves?

I’ll do some testing either this evening or over the weekend and see what I can find out about position.

What version of jamf pro are you running?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mike-levenick/mut/issues/10#issuecomment-339711789, or mute the thread https://github.com/notifications/unsubscribe-auth/AfkXZhAzKeHg61Fqx52EMFfQkrdKpxd2ks5swKqbgaJpZM4QGfD2 .

mike-levenick commented 6 years ago

Hello,

So I think I found something, and I'll do some deeper testing on it, but it looks like I can wipe out a position for a USER object, but not on the DEVICE object itself.

The good news is, that if you modify the user object associated with a device, those changes populate over to the device itself.

For example: I have an iPad named Mike's iPad, with a serial number C12345. It is assigned to Mike.Levenick, who has a position of "Support". If I try to change the Position for Mike's iPad to "" it does not work (although MUT returns a 201, and the response XML looks good).

That said, if I change "Mike.Levenick"s position to "", it DOES work, and the device Mike's iPad also gets its position blanked out.

Give that a shot. I'm going to do some deeper digging into this and see if it's a MUT issue or an API quirk. The fact that I'm getting a 201 leads me to believe the latter, but further investigation is needed.

mike-levenick commented 6 years ago

After checking, I also cannot remove other fields like "Full Name" from the device record itself as long as it has a username associated with it.

However, once I remove the username from a Device, I am able to remove other fields (such as full name/position).

I believe this is intended functionality, there is a User object associated with that device, so Jamf Pro is going to continue to pull the information from that User object--and if we wipe out the Position or Full Name, it just gets pulled right back in from the User object.

That said, as stated above, you can "work around" this by modifying the User object itself. Simply use dropdowns such as this:

screen shot 2017-10-27 at 10 25 45 am

clbragdon commented 6 years ago

Mike,

Sorry I haven't gotten back to you regarding the work around you suggested. The entire State of Maine has been hit by a major storm causing large numbers of power outages, and consequently no internet service. There were nearly 500,000 people without power at one point (our district included!) and it remains at about 100,000. It could still be days before restoration is complete!! And even in areas where power is on, internet service can be non-existent, or spotty at best.

I was able to test the workaround out yesterday and if I clear the User's Position, it does filter down to the device record Position and blanks out the value.

I tested it on small groups first but will complete the remaining imports today.

Thank you so much for your help. I will contact you if I have any further issues.

I really appreciate your prompt response and your help in working through this issue. This info is going to be very helpful to me in the future!!

Thanks again!!

Cinda-Lee Bragdon MLTI Tech Lead Gray-New Gloucester High School 10 Libby Hill Road Gray ME 04039 207-657-9328 Email: cbragdon@sad15.org

On Fri, Oct 27, 2017 at 11:26 AM, Mike Levenick notifications@github.com wrote:

After checking, I also cannot remove other fields like "Full Name" from the device record itself as long as it has a username associated with it.

However, once I remove the username from a Device, I am able to remove other fields (such as full name/position).

I believe this is intended functionality, there is a User object associated with that device, so Jamf Pro is going to continue to pull the information from that User object--and if we wipe out the Position or Full Name, it just gets pulled right back in from the User object.

That said, as stated above, you can "work around" this by modifying the User object itself. Simply use dropdowns such as this:

[image: screen shot 2017-10-27 at 10 25 45 am] https://user-images.githubusercontent.com/12515543/32111819-3fd6f710-bb01-11e7-8cf5-00ccf93e54ff.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mike-levenick/mut/issues/10#issuecomment-340003548, or mute the thread https://github.com/notifications/unsubscribe-auth/AfkXZn4zcnTDO4de39SrrJXnKVvnnTPZks5swfYbgaJpZM4QGfD2 .

mike-levenick commented 6 years ago

I'm very glad to hear it! Always happy to help. :) 👍

I'll close this one up for now, but as always, never hesitate to reach out if you need something.