Skip to content

[Bug]: (FMCS) User cannot re-send acceptance request if original administrator is not in their company #18571

@uberbrady

Description

@uberbrady

Snipe-IT Version

v8.3.7 - build 21025-ga8c268760

PHP Version

v8.2.30

Composer Version

v2.3.9

MySQL/MariaDB version

MariaDB 10.3.36

How did you install Snipe-IT?

Hosted by Grokability

Is this a fresh install or an upgrade?

Fresh install

What happened?

User finds that they can send the unaccepted asset reminders only to some users on the unaccepted asset reports. Whereas some of those reminders will result in an error 500.

Both the user and our support note that with their superuser accounts, then can send those reminders. But with the user's "regular" (company-constrained) account, the 500-error triggers.

In my digging around, this is what I think is happening. The administrator performing the action, the user to whom they're sending the email, and the asset are all in the same company, as we would like. However, the administrator who originally did the check-out was in the NULL company. I believe this may have triggered company constraints on the 'adminuser' lookup, causing a NULL result - even when the action_logs table's created_by field is very clearly populated.

in re: [FD-53889]

What browsers are you seeing the problem on?

Other

Can you reproduce this on the public demo?

Yes

Do you have full multiple company support enabled?

Yes

If you have full multiple company support enabled, do you have location scoping to company enabled?

No

Application log output

production.ERROR: App\Mail\CheckoutAssetMail::__construct(): Argument #3 ($checkedOutBy) must be of type App\Models\User, null given, called in /snipe-it
/app/Http/Controllers/ReportsController.php on line 1231 {"userId":xxxxxxxx,"exception":"[object] (TypeError(code: 0): App\\Mail\\CheckoutAssetMail::__construct(): Argument #3 ($ch
eckedOutBy) must be of type App\\Models\\User, null given, called in /snipe-it/app/Http/Controllers/ReportsController.php on line 1231 at /snipe-it/app/Mail/CheckoutAssetMail.
php:28)

Browser console output

Common Issues

  • I have searched this repo for existing issues related to my issue (including closed issues)
  • My APP_URL is set correctly in my .env file (including http or https and no trailing slash)
  • I have searched the official Snipe-IT documentation and have checked the Common Issues documentation (where applicable)
  • I have run database migrations (where applicable).
  • I have attached screenshots and/or videos of the issue (where applicable)

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions