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

Parent and Child locations, and quantities

Open MSWork79 opened this issue 7 years ago • 98 comments

Expected Behavior (or desired behavior if a feature request)

CHS - Parent CHS Business Lab - Child

CHS - 2 assets CHS Business Lab - 25 assets

Expected Location CHS to have a total of 27 assets reported. (Parent + Child = Total)


Actual Behavior

CHS has 2 assets and does not factor in child quantities.

parent child qty


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


Provide answers to these questions:

  • Is this a fresh install or an upgrade? Upgrade
  • Version of Snipe-IT you're running Version v4.1.6-pre - build 2963 (master)
  • Version of PHP you're running 7.0.22-0ubuntu0.16.04.1
  • Version of MySQL/MariaDB you're running 5.4.29
  • What OS and web server you're running Snipe-IT on Ubuntu 16.04.1 / Apache2
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) install.sh
  • WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error n/a
  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error

I have 25 assets assigned to a child location, and presently, the parent location does not reflect the quantity of assets in the child location.

  • Confirm whether the error is reproduceable on the demo: https://snipeitapp.com/demo.

Tried to reproduce, but there weren't any child locations and while I made one, I couldn't make a user move to it so I could manipulate the assets/locations/etc.

  • Include any additional information you can find in app/storage/logs and your webserver's logs.
    n/a
  • Include what you've done so far in the installation, and if you got any error messages along the way. n/a
  • Indicate whether or not you've manually edited any data directly in the database Not edited.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

MSWork79 avatar Nov 30 '17 22:11 MSWork79

That's a level of recursion hell I personally don't want to mess with right now. :(

snipe avatar Nov 30 '17 23:11 snipe

No worries. The locations page is pretty solid as it is.

MSWork79 avatar Nov 30 '17 23:11 MSWork79

Hah - "I don't wanna" isn't really a sufficient reason to close this ticket though. It's a valid feature request, it's just hard and it's been a long week. :P

snipe avatar Nov 30 '17 23:11 snipe

weepandthendie

snipe avatar Nov 30 '17 23:11 snipe

head-pat-gif-5

MSWork79 avatar Nov 30 '17 23:11 MSWork79

We'll have close to 2,500 to 3,000 assets in the system once I get all this stuff figured out. So it would be really nice to get a quick glance of each facility quantities, as well as specific breakdowns of child locations. Take your time though, it's not hard to just stare at the /locations page a little bit longer. Maybe with a calculator.

MSWork79 avatar Nov 30 '17 23:11 MSWork79

Hm. How many levels of nesting do you have for locations? The problem is never the first level to child level, it's the one user who has like 50 levels of recursion.

snipe avatar Nov 30 '17 23:11 snipe

I foresee only nesting one level, maaaaaybe two?

MSWork79 avatar Dec 01 '17 19:12 MSWork79

Company technically covers the highest level of "Location" here, so: Company - Our School District Parent Location - Campus (x3), Office Buildings (x1), District employees that aren't assigned to one campus (x1) Child Locations - If we were going to do it by room, we could do it here. We're only going to be doing it for labs and more permanent-type things. Teachers switch rooms and what not, and we don't want to try and track that. Anything else I can think of would still fall under the primary Parent location so I can't think of why I would need a deep nest of locations.

MSWork79 avatar Dec 01 '17 19:12 MSWork79

@MSTigers unrelated to totals right now, but I just pushed out some changes to the locations and suppliers details pages that I think you might like. You now get WAY more info and actions on both.

screen shot 2017-12-01 at 9 22 14 pm screen shot 2017-12-01 at 10 06 29 pm

snipe avatar Dec 02 '17 06:12 snipe

Looking good! Sorry for delayed feedback. I thought I had replied when I checked it out.

MSWork79 avatar Dec 07 '17 21:12 MSWork79

So previously we weren't going to have a lot of locations - but that's going to change. The nesting levels will still be the same. We are going to be utilizing locations for each classroom and then, pending further investigation, assigning teachers as a manager of that location or just assigning that teacher to that location.

Some assets will be assigned to the teacher, while other semi-permanent assets will be assigned to the room. Projectors, for example, will be location based and not follow a teacher around when they move.

Schools are complicated!

MSWork79 avatar Dec 08 '17 21:12 MSWork79

District - Parent Level Admin Buildings (Child of District) Tech Dept (Child of District) Tech Infrastructure - Parent Level Campus - Parent Level Classroom (Child of Campus)

Because the fact that company is there, that's the upper most parent. I have not had the need to go beyond 1 nest, Parent <-> Child, location. All of the above parents and their child locations are part of Company, so if I want to view all assets I can do that.

I could understand the need of someone's child locations having a deeper nest of child locations under it Parent -> Child (who is now a parent, but not THE parent) -> (Grand)Child ->Etc. but I myself have no need of it. I could see it being a major, MAJOR pain trying to say OK, Parent location as 5 devices to itself, and all of the children total have 10, so parent has 15. Child has 8, and grandchild has 2, so child technically has 10, but don't count it as 10 when adding to the parents total - and then trying to develop a system that will adapt to people adding more and more nested locations.

Clearly I'm bias because I don't need to go more than 1 nested level (parent -> child), but I'd be in favor of restricting how many nests is allowed. Or perhaps, an option that says "If you have more than one nested level of parent/child locations, the cumulative total function will be disabled) or something. That way people who do need to have A parent that has a child, that has a child, that has another child, with another child (5 generations!!) can still do it. They just won't get the math done for them beyond what it is currently doing.

Also pretty pictures: parent child map

MSWork79 avatar Jan 17 '18 23:01 MSWork79

Just would like to add that this feature would be quite valuable for us! In our case it would be use like this: Company (our School federation) Campus (the 5 different schools in our federation) -- Parent Building (A,B,C) -- Child of Campus Floor (100,200,300) -- Child of Building Room (121,231,312) -- Child of Floor

As we are talking about 5500 computers, 1000 external monitors, around 300 projectors and 300 speakers this feature would be really handy for us too very easily to find and sort out our equipment when its time to replace and upgrade.

ketonic avatar Apr 04 '18 07:04 ketonic

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

stale[bot] avatar Jun 03 '18 08:06 stale[bot]

Only thing stale here are my jokes

On Sun, Jun 3, 2018, 3:40 AM stale[bot] [email protected] wrote:

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/snipe/snipe-it/issues/4546#issuecomment-394146619, or mute the thread https://github.com/notifications/unsubscribe-auth/Afv4DmkuWObGt5dpXRIKXai5IneYETtOks5t46DmgaJpZM4QxVGP .

MSWork79 avatar Jun 03 '18 16:06 MSWork79

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 Aug 02 '18 17:08 stale[bot]

I'm not sure why this was marked as stale. According to the rules we use, tagged feature requests/ready for dev issues shouldn't be marked as stale. :-/

snipe avatar Aug 02 '18 17:08 snipe

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 Oct 01 '18 17:10 stale[bot]

Bump?

ketonic avatar Oct 03 '18 12:10 ketonic

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 Oct 03 '18 12:10 stale[bot]

Stale bot does not care about your silly rules, lol

MSWork79 avatar Oct 04 '18 14:10 MSWork79

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 03 '18 15:12 stale[bot]

oi

MSWork79 avatar Dec 03 '18 19:12 MSWork79

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 Dec 03 '18 19:12 stale[bot]

i'll throw in another oi for us

decyphered avatar Dec 13 '18 00:12 decyphered

And another oi. This feature would be really useful. Currently it prevents me from migrating to Snipe-it. I need to include assets in all rooms and floors of a particular building in a custom asset report. Thank you!

denhyde avatar Jan 24 '19 17:01 denhyde

Discussion!

Assuming every location at 5 assets,

Campus (Parent) 5 (20) Building (Child of Campus) 5 (15) Floor (Child of Building) 5 (10) Room (Child of Floor) 5

I think this is the most realistic setup, so I would (as bias mentioned early) say that in order to reduce the complexity of implementation, that we restrict the level of nesting to accommodate for the above. This should also apply to businesses. If they need more than City > Building > Floor > Room, then I suggest they make a separate company or something.

Does anyone have a scenario that the above would not cover that would be an issue for you? I don't need this many levels, but I don't want to encourage Snipe to implement something that only benefits a small group. I also do not want to overly complicate the implementation to the point that it doesn't get implemented either.

MSWork79 avatar Mar 06 '19 17:03 MSWork79

I'm not sure about the naming but that number of levels would work for most of our use case. The way we label item locations is generally: Building Room [Section of Room]

Section of room is used mostly for our larger storage rooms that we pile things in. Though we do have the rare case were we have a few extra levels for server racks.

... Rack Number Rack Unit

For example:

"Skiles": {
  "155": {
    "155-0": {},
    "155-1": {},
    "155-2": {},
    "155-3":  {}.
    "155-4": {},
    "155-5": {},
    "155-6": {},
    "155B" { # Subroom in the room
      "155B-r1": { # Server rack
        "155B-r1u10",
        "155B-r1u20",
        "155B-r1u30"
      },
      "155B-r2": {
        "155B-r2u10",
        "155B-r2u20",
        "155B-r2u30"
      }
    }
  }
}

Sxderp avatar Mar 19 '19 17:03 Sxderp

We would only need Building, Floor, Room.... So 3-4 levels would be fine.

twisted3motions avatar Apr 12 '19 07:04 twisted3motions