I've posted about this before and I've seen other people with the same issue. The answer is always unsatisfying. But now it's a problem for me.
I need a way to clean up old departments. Every single department I want to make go away was created because of an incorrect spelling on user info from an AD import. But now we have a new issue. An asset import was done and the wrong column was selected for the Department field. So it created a whole slew of new departments that I cannot get rid of.
I thought deleting the asset would allow me to delete the department. Nope.
I thought updating the assets department to something correct would allow me to delete the wrongly created one. Nope.
It just says its being used by a module and it'll grey itself out.
So I need a query. Something we can run against the database. And maybe this is too black and white to actually work. But if I know what DeptID I want gone. And I know what DeptID I want to replace it with. Can't we just change that on the database? For instance, anywhere where the DeptID = '13554' needs to change to DeptID = '16'
If that's possible, wouldn't that mean that Dept ID 13554 is now completely gone and can be removed fully from the Department list?
Edit: So I had a thought. I'm in the process of removing all our Sites since we are technically only supposed to be one site. I've created one new site for all our Departments to fall under. Can I, via query, update all the SiteID's on our database to the new one. And for each Department, I'll get the new DeptID that relates to the new SiteID and apply that to where it needs to go.