Automation when creating requests for new computers
Asked by Marcin Koprowski:

Hello,

I'm trying to set up something in Jira Asset Management and Jira Service Management. Below I'm describing what I'm trying to do:

I would like to be able to set up Jira Asset Management and Jira Service Management, so that's possible to submit Buy New Computer requests for users that are about to start working for our company. Is it possible to create an object, for example a laptop, that has a name following a certain standard, such as: LaptopName1, LaptopName2, etc.? Do I need to do it manually from within the Jira Asset Management? Or is it possible for this to be somehow automated? For example, I could create a request in Jira Service Management for requesting a new computer for a new joiner and I would like to be able to select a laptop that is currently in stock. I know that I can do this by writing an AQL statement that checks statuses of computers (e.g. not in service), but how to make it possible, when populating the request form, in Jira Service Management, to create an object in the Jira Assets that would assign a unique name to the laptop. Like, for example, Laptop2, Laptop3, LaptopX, etc.? I would want to avoid doing it manually from within the Assets feature, as our end user responsible for this could be overwhelmed.

To summarize, these are the steps that I'm looking to implement:

1. Our HR team receives information that a new users is starting in 4 weeks time, from now.

2. They go to the Jira Service Management customer portal and open the request form while populating the fields with the relevant information.

3. The Jira Service Management somehow creates a unique name for the laptop and the user is able to select the uniquely named laptop from the drop-down menu in the Jira Service Management form.

4. User submits the form and it creates a service request in Jira Service Management and, also, creates a laptop object in Jira Assets, based on the information provided by the user in the form, like, serial number, QR code, etc.

What I'm describing above doesn't contain all the steps, only those crucial ones.

Please let me know if I can clarify those questions, or the description itself, so that I can be better understood.

Thank you.

Best wishes,

Marcin


Answers:
author: Eugenio Onofre
body: Hi [@Marcin Koprowski](/t5/user/viewprofilepage/user-id/5343945)

Welcome to the Atlassian Community.  
Automating the process of creating an object in Jira Assets based on a request in Jira Service Management is possible but might require a bit of customization. Here's how you can approach it:

1. **Automated object creation:** You need to set up automation rules in Jira Service Management that trigger when a "Buy New Computer" request is submitted. These automation rules can then create an object in Jira Assets.
2. **Naming convention for assets:** To automatically assign a unique name like "Laptop1", "Laptop2", etc., your automation rule needs to have logic to determine the next available name. This could involve querying the existing assets to find the last number used and then incrementing it for the new asset.
3. **Integration between Jira Service Management and Jira Assets:** The key here is to utilize Jira's automation capabilities effectively. You can use the information provided in the service request to create a new asset in Jira Assets with the required attributes such as serial number, QR code, etc.
4. **Selecting in-stock laptops:** For the part where users need to select a laptop currently in stock, your request form can have a dynamically populated dropdown field. This field can use an AQL (Assets Query Language) statement to list only those laptops that are marked as available or not in service.

For detailed steps and technical guidance, it's recommended to check the Atlassian documentation or community forums, as they often have specific instructions and examples. If you encounter limitations with the built-in automation capabilities, you might need to explore additional scripting or plugin options. ?

Please remember to accept this answer in case it helps you resolve your question as it may also help other community members in the future.

Regards,  
Eugenio


Tags: cloud

jira-service-management

jira-service-management-cloud