snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Unaccepted Assets not working

Open diegogarciadev opened this issue 6 years ago • 12 comments

Please confirm you have done the following before posting your bug report:

Describe the bug Unaccepted Assets report is not working, when you go to https://develop.snipeitapp.com/reports/unaccepted_assets you will see Showing 1 to 1 of 1 rows or something like that but no content:

image

As I can see in debug mode, an api call to maintenances is shown image

Expected behavior Show unacepted assets

diegogarciadev avatar Oct 27 '20 15:10 diegogarciadev

Same here on 5.0.3

Relix360 avatar Oct 27 '20 18:10 Relix360

in version 5.0.4 it also shows that problem

krojas4 avatar Oct 28 '20 00:10 krojas4

Problem also present on demo

@snipe

Relix360 avatar Oct 29 '20 17:10 Relix360

Same here on v5.0.5 It displays for one second and then gives out blank page.

sarang2502 avatar Nov 04 '20 17:11 sarang2502

I've found on this file: resources/views/reports/unaccepted_assets.blade.php the following content:

data-url="{{route('api.maintenances.index') }}"

image

diegogarciadev avatar Nov 06 '20 07:11 diegogarciadev

image

[2020-11-06 12:43:23] production.ERROR: BadMethodCallException: Call to undefined method App\Models\Asset::unaccepted() in /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php:50
Stack trace:
#0 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php(36): Illuminate\Database\Eloquent\Model::throwBadMethodCallException('unaccepted')
#1 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1622): Illuminate\Database\Eloquent\Model->forwardCallTo(Object(Illuminate\Database\Eloquent\Builder), 'unaccepted', Array)
#2 /var/www/html/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1634): Illuminate\Database\Eloquent\Model->__call('unaccepted', Array)
#3 /var/www/html/snipe-it/app/Http/Controllers/ReportsController.php(981): Illuminate\Database\Eloquent\Model::__callStatic('unaccepted', Array)
#4 /var/www/html/snipe-it/app/Http/Controllers/ReportsController.php(866): App\Http\Controllers\ReportsController->getAssetsNotAcceptedYet()

diegogarciadev avatar Nov 06 '20 11:11 diegogarciadev

My setup is experiencing the same issue since 5.0.1.

Pikok89 avatar Nov 10 '20 11:11 Pikok89

Thank you @diegogarciadev I am experiencing the same issue.

thumperest avatar Nov 11 '20 12:11 thumperest

@diegogarciadev that was also present on 4.9.2 but in that version the report was working image

Relix360 avatar Nov 11 '20 18:11 Relix360

@Relix360 Yes, I think this is for export, if you try to export what data you obatain?

diegogarciadev avatar Nov 12 '20 11:11 diegogarciadev

@diegogarciadev I'm not running a 4.9 2 version anymore, but on 5.0.3 i get a blank file, I also have tried replacing the file for the one in 4.9.2 but I got the same result from the report

Relix360 avatar Nov 12 '20 13:11 Relix360

This was fixed on develop earlier this week

snipe avatar Nov 13 '20 06:11 snipe