How to manage inventory assigned to employees
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
This is a very common requirement. Customers want to manage the laptop/computer inventory assigned to employees.
In the following scenario, there are two objects Type:
- Employee
- Computer
Computers are assigned to employees and Computer objects have an attribute called Status.
If a Computer object is assigned to any Employee object the status is not equal to Free.
We need to write an IQL so that while assigning any computer to an employee object, It only lists down the computers that have the status set as Free.
Environment
Any Insight / Assets Version
Solution
You can write an IQL on the Computer attribute of the Employee object as below.
"Status=Free OR object having inboundReferences(Name = ${Name})"
Note: This will only work given the scenario that Computer objects are always unassigned from a Person before the status is changed to Free.