-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes bulk checking out of undeployable asset #16492
base: develop
Are you sure you want to change the base?
Fixes bulk checking out of undeployable asset #16492
Conversation
PR Summary
|
$undeployable_assets = Asset::whereIn('id', $asset_ids) | ||
->whereHas('assetStatus', function ($query){ | ||
$query->where('deployable', 0) | ||
->where('archived', 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we wouldn't want to allow an archived asset to be checked out?
I think there's a small conflict in a few of the ways we handle this, which we should probably address, since the behavior is different in a few spots. In the API Statuslabel checkIfDeployable()
method, we allow pending or deployable. (That is only used by the create/edit asset form when determining if we should present a checkout, via #16354)
In the query scopes on the Asset, scopeRTD()
, scopeUndeployable()
, we include/exclude pending. We should probably make those consistent across the board, but we'd need to see what else it might break before doing that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, the double negatives are killing me here lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think deployable = 0, archived = 1 is all we need here?
I dunno, now I'm confused :-/
This prevents bulk checking out assets with an undeployable status. Redirecting you back to the asset index.
Plural:


Singular:
#16455