Skip to content

Conversation

ntaylor-86
Copy link
Contributor

The PR adds license version to licenses as raised in issue #17824

I wasn't sure on the translations, please let me know if that needs to be fixed.

Cheers!

@ntaylor-86 ntaylor-86 requested a review from snipe as a code owner September 10, 2025 06:10
], [
'field' => 'version',
'searchable' => false,
'sortable' => true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'd need to add version to the $allowed_columns in the Licenses API in order to sort on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in commit 8ab9154

@snipe
Copy link
Member

snipe commented Sep 10, 2025

We'd probably want to check validation with name+version combined, the way we do with model name+model number. I can see people needing to track different versions of the same software.

@snipe
Copy link
Member

snipe commented Sep 10, 2025

Note to myself: I'll need to add that field to the importer as well.

@ntaylor-86
Copy link
Contributor Author

Note to myself: I'll need to add that field to the importer as well.

Added in commit 4091cae

$this->item['reassignable'] = 1;
}
$this->item['seats'] = $this->findCsvMatch($row, 'seats');
$this->item['version'] = $this->findCsvMatch($row, 'version');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to add this to the mapping options as well for this to import properly.

$this->licenses_fields = [
'asset_tag' => trans('general.importer.checked_out_to_tag'),
'category' => trans('general.category'),
'checkout_class' => trans('general.importer.checkout_type'),
'company' => trans('general.company'),
'email' => trans('general.importer.checked_out_to_email'),
'expiration_date' => trans('admin/licenses/form.expiration'),
'full_name' => trans('general.importer.checked_out_to_fullname'),
'item_name' => trans('general.item_name_var', ['item' => trans('general.license')]),
'license_email' => trans('admin/licenses/form.to_email'),
'license_name' => trans('admin/licenses/form.to_name'),
'location' => trans('general.location'),
'maintained' => trans('admin/licenses/form.maintained'),
'manufacturer' => trans('general.manufacturer'),
'min_amt' => trans('general.min_amt'),
'notes' => trans('general.notes'),
'order_number' => trans('general.order_number'),
'purchase_cost' => trans('general.purchase_cost'),
'purchase_date' => trans('general.purchase_date'),
'purchase_order' => trans('admin/licenses/form.purchase_order'),
'reassignable' => trans('admin/licenses/form.reassignable'),
'seats' => trans('admin/licenses/form.seats'),
'serial' => trans('general.license_serial'),
'supplier' => trans('general.supplier'),
'termination_date' => trans('admin/licenses/form.termination_date'),
'username' => trans('general.importer.checked_out_to_username'),
];

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in commit 6d3e494

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants