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

license on Asset does not change user in overview

Open bentobox582 opened this issue 6 years ago • 22 comments

Describe the bug A clear and concise description of what the bug is.

when i change the user of the asset, the license on the changed asset doesn't change his user and stays on the old user.

To Reproduce Steps to reproduce the behavior:

  1. license assigned to a asset. image

  2. licensed asset check in image

  3. license is still assign to the user "Denis Özdas" image

  4. check out asset to another user image

5.license is still assign on the old user image

Expected behavior the license should be assign to the new user from the Asset (Bastian Rhyner)

Server (please complete the following information):

  • Snipe-IT Version v4.7.8
  • OS: windows server 2016
  • Web Server: IIS
  • PHP Version 7.1.7

Desktop (please complete the following information):

  • OS: windows 10
  • Browser chrome
  • Version 78.0.3904.108 (Official Build) (64-bit)

bentobox582 avatar Dec 02 '19 10:12 bentobox582

I was about to log this same bug, so can confirm that I am able to reproduce on v4.7.8 - build 4170 (master)

patrict avatar Dec 09 '19 11:12 patrict

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

stale[bot] avatar Feb 07 '20 11:02 stale[bot]

Still relevant

patrict avatar Feb 07 '20 13:02 patrict

Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know!

stale[bot] avatar Feb 07 '20 13:02 stale[bot]

We see this, too, but for us it's more related to licenses. Currently, if we want to update the associated user, we:

  • write down which asset the license is currently checked out to
  • check in license
  • check out license to same asset

In addition to being annoying, it adds clutter and confusion to the license's history e.g. "why are you checking in and out the license to the same asset?"

If the name cannot be returned to the screen dynamically (i.e. don't store it, but query asset when the page listing assets/licenses/etc. is loaded), maybe have a script that can be scheduled to run periodically (e.g. once every hour) that updates the data - assuming one doesn't already exist.

Thanks!

greecemunky avatar Mar 05 '20 00:03 greecemunky

Same problem here, anybody got a solution yet? So we lose track of our licenses.

BunzlDubi avatar Mar 10 '20 14:03 BunzlDubi

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

stale[bot] avatar May 09 '20 14:05 stale[bot]

Still relevant. As soon as my exams are done Ill try have a crack at this.

patrict avatar May 10 '20 12:05 patrict

Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know!

stale[bot] avatar May 10 '20 12:05 stale[bot]

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

stale[bot] avatar Jul 11 '20 01:07 stale[bot]

Still relevant

patrict avatar Jul 12 '20 05:07 patrict

Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know!

stale[bot] avatar Jul 12 '20 05:07 stale[bot]

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

stale[bot] avatar Sep 11 '20 03:09 stale[bot]

Still relevant

patrict avatar Sep 11 '20 05:09 patrict

Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know!

stale[bot] avatar Sep 11 '20 05:09 stale[bot]

I've tested again on v4.9.3 - build 4395 and this is still an issue. Sadly Im just not getting time to have a go at this one

patrict avatar Sep 11 '20 19:09 patrict

@snipe before I have a go at this, would you mind confirming that you agree with what we describe as the expected behaviour?

patrict avatar Sep 11 '20 20:09 patrict

I see that issue #7935 speaks about another aspect of this issue. I believe if the system behaviour is changed as described in that issue, this issue will automatically be resolved. It observes that when checking out a license to an asset, the license is associated with the asset and the current asset owner. If the license were only associated with the asset, then the problem observed in this issue would not occur in the first place.

@snipe I had an initial go at changing the AssetCheckinController and AssetCheckoutController to respectively disassociate and reassociate all licenses to an asset owner on checkin and checkout, but the above suggestion seems much simpler. Id appreciate you weighing in here?

patrict avatar Sep 16 '20 10:09 patrict

So I thought about this a bit more and its a bit of a grey area. On the one hand, when you allocate a license to an asset, then if you allocate that asset to a user, you would not expect the license to be associated with the user at all. On the other hand, it is nice to be able to see what licenses a user has access to while an asset is checked out to them.

I haven't received any input, so I decided to go with the proposal in this issue and disassociate all asset licences from a user when the asset gets checked in, and associate all asset licenses with the new user when an asset gets checked out.

I am submitting a pull request on this issue - if it gets accepted, it will resolve the problem described in #7935 .

patrict avatar Sep 18 '20 20:09 patrict

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

stale[bot] avatar Dec 25 '20 16:12 stale[bot]

Still relevant

patrict avatar Dec 26 '20 08:12 patrict

It's still relevant with v5.2.0

bunzladi avatar Oct 13 '21 12:10 bunzladi

Cannot reproduce.

bzeus avatar Jul 01 '25 03:07 bzeus