When you put a label on a headset, a QR code is useful, but it also helps to read the serial number and model without scanning anything.
Jira Assets Cloud already supports printing QR codes and saving them as PDF. Customising the accompanying label layout is a separate requirement. As of 14 October 2026, Atlassian’s request JSDCLOUD-10975: Customize Assets QR codes / print label tags remains open with the status Gathering Interest.
This article describes a PowerShell workaround: query Assets using AQL and create a printable HTML file containing a QR code, serial number and model name for every selected object.
The QR encodes the object’s Jira web URL. The serial number and model name are printed beside it. This is a custom label generator built around the Assets REST API.
What the script produces
Each label includes:
- A QR code linking to the corresponding object in Jira Assets.
- Its serial number as readable text.
- Its model name as readable text.
The HTML provides controls for label width, height, QR size, columns, spacing and page margins. It supports A4, Letter and one label per page for label printers.
QR codes are generated locally using an embedded copy of Project Nayuki’s QR Code generator library. Asset URLs are not sent to an external QR generation service. After the HTML has been generated, displaying and printing its labels does not require a network connection. Opening a scanned Jira link still requires access to Jira.
The accompanying package contains the complete Export-JiraAssets-QRLabels.ps1 script, a plain text copy and Demo-QR-Labels.html with fictional data. The complete QR library and its MIT licence notice are embedded in the script.
Requirements
Use an Atlassian Cloud site with Assets, an account that can read the selected objects and attributes, and an Atlassian API token suitable for those endpoints. Referenced model objects must also be readable by that account.
The script uses email and API token Basic authentication, following Atlassian’s Assets REST API workflow. It performs read operations; its POST requests run AQL searches and do not update objects.
PowerShell 7 and Edge or Chrome are recommended. The script declares PowerShell 5.1 as its minimum and uses compatible syntax, but the runtime tests for this version used PowerShell 7.4. No additional PowerShell module, Python installation or browser CDN is required.
1. Try the demo first
Save the supplied script and run:
.\Export-JiraAssets-QRLabels.ps1 -Demo
This creates twelve fictional labels and opens the generated HTML without contacting Jira. You can also open the supplied Demo-QR-Labels.html directly in Edge or Chrome.
The initial layout uses 50 × 25 mm labels and a 21 mm QR, including its white border. These are example dimensions: enter the measurements of your own label stock before printing.
2. Select the objects with AQL
Run your intended query in Assets first. For example:
objectType = "Headset"
Scope the query to the intended schema if the same object type name exists in more than one schema. The script uses your query as supplied and follows pagination to retrieve the matching objects.
It uses the current POST /object/aql endpoint, with attributes included in the response.
3. Configure the site and attribute names
An example invocation is:
.\Export-JiraAssets-QRLabels.ps1 `
-SiteUrl "https://your-site.atlassian.net" `
-Email "you@example.com" `
-Aql 'objectType = "Headset"' `
-SerialAttribute "Serial Number" `
-ModelAttribute "Model Name"
Replace the site and email placeholders with your own values. The script requests the API token through a hidden prompt. It also accepts the JIRA_EMAIL and JIRA_API_TOKEN environment variables.
Attribute names are configurable. If serial numbers are stored in Name, use -SerialAttribute "Name". If the model field is called Model, use -ModelAttribute "Model". Optional -SerialAttributeId and -ModelAttributeId parameters take precedence over names and must match the object type being queried.
CloudId and WorkspaceId are discovered automatically unless you supply them explicitly with -CloudId and -WorkspaceId. Those values must belong to the same site. Atlassian documents CloudId discovery through the site’s /_edge/tenant_info endpoint.
When the model is an object reference
If the model attribute references another Assets object, the script uses that object’s visible label. If the desired model name is stored in a different attribute of the referenced object, specify it:
.\Export-JiraAssets-QRLabels.ps1 `
-SiteUrl "https://your-site.atlassian.net" `
-Email "you@example.com" `
-Aql 'objectType = "Headset"' `
-SerialAttribute "Serial Number" `
-ModelAttribute "Model" `
-ReferencedModelNameAttribute "Name"
Here, Model is the attribute on the headset, while Name is the attribute to read from its referenced model object. Repeated model lookups are cached during the run.
4. Generate and print the labels
Each run creates a separate output folder under the user’s temporary directory. You can choose another parent directory with -OutputFolder.
The generated files are:
File | Purpose |
|---|
Assets-QR-Labels.html
| Self-contained label preview and print controls. |
Assets-QR-Labels.csv
| Manifest containing serial number, model name, URL and object key for checking the correspondence. |
Label-Errors.csv
| Created when objects have missing, ambiguous or unreadable data. |
Open the HTML in Edge or Chrome, choose the paper mode and enter your label measurements. For sheets, adjust columns, horizontal and vertical gaps, and margins. For a label printer, select One label per page and select the same physical size in the printer driver.
Click Update preview, then Print / Save PDF. In the browser’s print dialog, use 100% scale, None for margins, and disable headers and footers. Avoid automatic scaling if you need to preserve the label dimensions.
The page checks whether the text fits and whether the QR is too dense at the selected size. Print one sample and scan it with your intended device before printing a batch. Printer resolution and label material affect the result.
Layout changes apply to the open page. Use Save as PDF to keep the selected layout as a file; reopening the original HTML restores its initial settings.
Handling incomplete asset data
The script stops label generation if any selected object fails validation. For example, an empty model name produces an error report instead of an incomplete label. The public version also prints grouped error reasons in the console.
Review Label-Errors.csv, correct the source data or deliberately adjust your query, and rerun. To inspect an error report:
Import-Csv -LiteralPath "PATH_TO_RUN_FOLDER\Label-Errors.csv" |
Format-List ObjectKey, ObjectId, Reason
If an attribute cannot be resolved, the message lists the available names and IDs for that object type. Check those names before assuming that fields are named identically across schemas.
Access and validation notes
Jira permissions still apply when someone scans a label. A printed QR does not grant access to the object.
Generated HTML and CSV files contain asset information and object links. Use the fictional demo when sharing examples publicly. Credentials are not embedded in those output files.
Validation used synthetic API responses and a local HTTP test endpoint, including pagination, JSON array handling, plain text models, referenced models and missing data. Browser checks covered printable layouts and QR decoding from generated output. This does not replace testing against your own tenant and physical printer. The object web URL format should also be checked in your tenant, as the Jira interface can change.
For teams that need readable asset details beside a QR, this provides a configurable printing workflow while native label customisation remains an open feature request.