Commit Graph

400 Commits

Author SHA1 Message Date
snipe
aa959fbe92 Added filter form request to validate JSON 2025-11-22 14:03:58 +00:00
snipe
1edea6abef Fixed RB-20347 - ambigious field in custom fields 2025-10-16 11:27:25 +01:00
snipe
4ae4af5c10 Fixed #17670 - advanced search on relationships not working 2025-10-07 15:39:09 +01:00
Marcus Moore
06f060161d Apply offset and limit 2025-09-15 15:43:54 -07:00
Marcus Moore
7393c4170b Apply first pass and scaffold additional test 2025-09-15 15:22:35 -07:00
Marcus Moore
73e185bf9d Scaffold route and tests 2025-09-15 15:12:05 -07:00
Marcus Moore
082bff2fa8 Add and use query scope helper 2025-09-09 13:04:14 -07:00
Marcus Moore
eada0b0bb5 Implement test 2025-09-09 11:58:43 -07:00
Marcus Moore
acc37045e4 Implement test 2025-09-09 11:34:50 -07:00
Marcus Moore
324070f345 Begin to build out test 2025-09-08 17:20:22 -07:00
snipe
c8e79aa5ca Merge branch 'develop' into add-display-name-to-users-fixed 2025-08-25 15:28:20 +01:00
snipe
b6d397bcca Updated ->present()->fullName() to ->display_name
Signed-off-by: snipe <snipe@snipe.net>
2025-08-25 14:57:34 +01:00
snipe
1488271a83 Added #8522 - depreciation info on Asset API
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 14:48:48 +01:00
snipe
c1b139fb9a Fixed #17627: custom fields not sorting correctly
Signed-off-by: snipe <snipe@snipe.net>
2025-08-18 12:31:03 +01:00
Marcus Moore
4a7b7183d2 Add custom_fields. prefix so custom fields can be filtered against 2025-08-11 14:58:41 -07:00
Marcus Moore
c95aeb3730 Filter out unallowed columns (custom fields) 2025-08-07 17:25:20 -07:00
snipe
ff01078b60 Fixed #12653 - adds job title to asset listing
Signed-off-by: snipe <snipe@snipe.net>
2025-06-15 02:23:53 +01:00
snipe
0fae18c4ba Better handle missing asset payload because of RMB
Signed-off-by: snipe <snipe@snipe.net>
2025-05-26 13:14:28 +01:00
snipe
6eb3819492 Apply correct unique custom field validation for audit API
Signed-off-by: snipe <snipe@snipe.net>
2025-05-15 18:31:49 +02:00
snipe
a67b320cae Merge pull request #15907 from uberbrady/protect_assigned_to_assigned_type_rebased
Rebased version of #15629 - prevent setting assigned_to without setting assigned_type
2025-05-05 20:42:46 +01:00
snipe
aed32e6ada Better handle arrays in API rerquests for model_id
Signed-off-by: snipe <snipe@snipe.net>
2025-04-22 16:23:34 +01:00
snipe
495b7db72b Merge branch 'chore/sc-28495' into develop
Signed-off-by: snipe <snipe@snipe.net>
2025-04-19 14:29:30 +01:00
snipe
7be3d6072f Removed erroneous comment
Signed-off-by: snipe <snipe@snipe.net>
2025-04-09 05:52:35 +01:00
snipe
362f14a01d Manually invoke a validator
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 01:59:33 +01:00
snipe
5b524399d9 Use RMB for asset audit API
Signed-off-by: snipe <snipe@snipe.net>
2025-04-07 22:07:51 +01:00
spencerrlongg
bfd827e529 added more eager loading 2025-03-31 12:28:03 -05:00
spencerrlongg
e273c7cbc5 Refactor asset retrieval to support pagination.
Introduced offset and limit handling for API asset queries to enable proper pagination. Adjusted the total count logic to maintain consistency in responses and ensure accurate transformation of assets.
2025-03-25 15:21:18 -05:00
snipe
fecee69de6 Use table name to avoid ambiguous query
Signed-off-by: snipe <snipe@snipe.net>
2025-03-05 00:43:04 +00:00
snipe
5ece721b00 Check for FMCS
Signed-off-by: snipe <snipe@snipe.net>
2025-02-23 15:02:45 +00:00
snipe
0e2251c810 Scope selectlist by company
Signed-off-by: snipe <snipe@snipe.net>
2025-02-23 14:59:05 +00:00
snipe
0cd0abe8bb Fixed #16282 - adds accessories tab to assets
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 14:20:21 +00:00
snipe
d3210c6d40 Return flat JSON instead of transformed data
Signed-off-by: snipe <snipe@snipe.net>
2025-02-13 14:16:32 +00:00
snipe
ac96b8d4ae Added assignedAccessories method
Signed-off-by: snipe <snipe@snipe.net>
2024-12-16 16:35:34 +00:00
snipe
183a4d49d8 Refactor of #15235 - added accessory checkout to locations, assets
Signed-off-by: snipe <snipe@snipe.net>
2024-12-16 16:34:49 +00:00
Brady Wetherington
eccdcc373e parent 2220828b00
author Brady Wetherington <bwetherington@grokability.com> 1728320853 +0100
committer Brady Wetherington <bwetherington@grokability.com> 1733158021 +0000

Prevent setting assigned_to without setting assigned_type

Fixed tests to include assigned_type when setting assigned_to

Add new tests for assigned_to without assigned_type

Added tighter validation to assigned_to and assigned_type, new tests

Fixed wrong comment

Fixed tests to include assigned_type when setting assigned_to

Add new tests for assigned_to without assigned_type

Fixed wrong comment
2024-12-02 16:53:08 +00:00
snipe
2cb1b6d462 Use transformer on API update
Signed-off-by: snipe <snipe@snipe.net>
2024-11-27 13:51:53 +00:00
NebelKreis
d5c141dc59 Fix: Removed setting validation as it is not strictly necessary 2024-11-20 11:55:48 +01:00
NebelKreis
66d6b01307 Feature: Added translations for label generation API endpoint 2024-11-19 14:16:06 +01:00
NebelKreis
889aff43c2 Feature: Added API endpoint for generating asset labels 2024-11-19 14:13:05 +01:00
Tobias Regnery
f3c4e55667 Refactor asset creation with API
Commit fb4fe3004 restored the previous behaviour to check the company_id in case of FullMultipleCompanySupport.
But after rereading the code and the laravel documentation, the check is already there where it belongs in AssetStoreRequest::prepareForValidation()
The bug is the is_int-check of the request input in prepareForValidation(). Is is of type string even if it is a numeric value, so the call to getIdForCurrentUser() never happend.
Fix this by removing the check and the now redundant call to getIdForCurrentUser().
Wrong values will get caught by the model-level validation rules.
2024-10-14 15:14:41 +02:00
Tobias Regnery
fb4fe30049 Fix asset creation with API and FullMultipleCompanySupport
It is currently possible to create an asset with arbitrary company without being superuser and FullMultipleCompanySupport enabled.
This bug goes back to 75ac7f80b9 which is part of version 6.3.0.
Fix this by restoring the previous behaviour to check the company_id with getIdForCurrentUser().
2024-10-11 12:19:20 +02:00
Brady Wetherington
350b627ce1 Fix numeric sort 'ambiguous order clause' error 2024-10-03 14:23:40 +01:00
snipe
27ba641aa5 Added checkin on delete to API
Signed-off-by: snipe <snipe@snipe.net>
2024-10-01 14:30:34 +01:00
snipe
0ce5832b6c Removed debugging
Signed-off-by: snipe <snipe@snipe.net>
2024-09-24 17:29:40 +01:00
snipe
5fb43dd159 Handle audit *and* audits for urls
Signed-off-by: snipe <snipe@snipe.net>
2024-09-24 16:55:56 +01:00
snipe
de57d71bf1 Fixed #15548 - unify audit due/overdue APIs
Signed-off-by: snipe <snipe@snipe.net>
2024-09-24 16:30:24 +01:00
snipe
b21c303e56 Merge remote-tracking branch 'origin/develop' into features/add_created_at_created_by 2024-09-20 13:43:50 +01:00
snipe
a77a7065d7 Added order by admin to assets
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 16:34:10 +01:00
snipe
1582d81e5b Change user_id to created_by
Signed-off-by: snipe <snipe@snipe.net>
2024-09-17 22:16:41 +01:00
snipe
7c85ad54eb Sort by numeric columns for numeric custom fields
Signed-off-by: snipe <snipe@snipe.net>
2024-09-17 19:44:03 +01:00