Moving an Asset Between Companies - edmozley/freeitsm GitHub Wiki
Moving an asset between companies
An asset filed under the wrong client used to stay there. Now you can move it, and adding an asset asks which company it is for.
Multi-company installs only. If you run FreeITSM for a single company none of this appears.
Moving one
Open the asset. On Key info, beside the asset tag, there is a Company field. Pick another company and confirm, and the asset moves.
You can only move an asset into a company you can reach yourself. The move is recorded in the asset's history. Because the asset list shows one company at a time, a moved asset leaves the list you are looking at; switch to its new company to see it.
What changes with it
Some things on an asset belong to its company, and do not exist in the new one. Those are cleared, and the message after the move names them:
- its location, unless it is a shared location;
- its type or status, if it is one the old company added for itself. Shared types and statuses move with it.
Everything else moves untouched: its history, custom fields, documents, its software and drive lists, and an analyst holding it.
The tools that report it move with it too. If the inventory agent, or another tool through the REST API, reports this asset, FreeITSM remembers which device in that tool it is. That link moves to the new company along with the asset, so the next report from that tool still lands on the right asset, and the old company is free to use that device number for one of its own machines. (Since 3.15.0. Before that the link stayed behind on the old company - see Inventory freshness - Developer Guide.)
When it refuses
FreeITSM will not guess on your behalf, so a move is refused, with the reason, when:
- the new company already has an asset with the same name, or the same asset tag - both are unique within a company;
- the asset is held by a person from another company. Unassign it first, or move the person;
- the asset is out on a lease, which belongs to the old company. Mark it returned or take it off the lease first;
- a tool that reports this asset already has the same device linked to a different asset in the new company. A tool's device can belong to only one asset per company, so the message names the other asset, and you unlink the device from one of them first (
DELETE /assets/{id}/inventory/{source}in the REST API). This only happens if the same machine was recorded twice, once in each company.
Adding an asset asks which company
When you can reach more than one company, Add asset starts with a Company question. It defaults to the company you are in, and in the All companies view it has no default and must be answered - so a new asset can no longer land in whichever company you happened to pick last.
The type, status and location lists change to match the company you choose. If you add an asset to a company other than the one on screen, the message tells you where it went.