human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

Kits-- on create, set visibility and market value of corresponding item

Open awwaiid opened this issue 5 months ago • 11 comments

Summary

When a kit is created, a corresponding item is created. This item should have the market value and visibility status entered for the kit.

Why

Improved workflow and reduced confusion It throws off the market value for the banks inventory by whatever the value of the items in the kit are -- making that number worse than useless.

Details

The Fair Market Value and visibility of the kits should come into the item market value when the kit is created. It appears that it does not.

Recreation

1/ Sign in as org admin.
3/ View a storage location. You're going to need an item that exists in it for the next step.
3/ Make a new kit (Inventory | Kits | New Kit) , giving it that item, and some market value, and visibility unchecked. 4/ For that kit, change its allocation, adding some to the storage location you looked at in step 1 (Modify allocation, choose the storage location, and put a positive # in "Change kit quantity by". Save.) 5) Check the value per item on the corresponding item for the kit: (Inventory | Items, the view the corresponding item) It should correspond to the value you entered for the kit. The visibility should also match.

Criteria for completion

  • [ ] When kit is created, corresponding item gets the entered market value
  • [ ] When kit is created, corresponding item gets the entered visibility status
  • [ ] After a kit is created, if the market value of any of the components is changed, the kit market value should change correspondingly (the complication in how you'd ensure this works points to some hackiness in how kits are handled in the system)
  • [ ] Tests to support above behaviours.

awwaiid avatar Jul 13 '25 14:07 awwaiid

I would take this

Naraveni avatar Jul 29 '25 19:07 Naraveni

Please do

cielf avatar Jul 30 '25 02:07 cielf

@cielf could please explain where and what to check for prices after creation of kit and modification. I tried but could not find what need to done.

Thank you

Naraveni avatar Aug 05 '25 02:08 Naraveni

@Naraveni Here's some clues about where to look: When we create a kit, the KitCreateService is called. That in turn calls ItemCreateService. I expect you'll need to pass the appropriate parameters to ItemCreateService in KitCreateService, and you'll need to make sure that those are passed in to KitCreateService.

Hope that helps

cielf avatar Aug 05 '25 19:08 cielf

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

github-actions[bot] avatar Sep 05 '25 00:09 github-actions[bot]

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Sep 13 '25 00:09 github-actions[bot]

I'll do

AlexeyKasianenko avatar Sep 25 '25 11:09 AlexeyKasianenko

@awwaiid could you explain to me this criterion?

After a kit is created, if the market value of any of the components is changed, the kit market value should change correspondingly (the complication in how you'd ensure this works points to some hackiness in how kits are handled in the system)

AlexeyKasianenko avatar Sep 26 '25 14:09 AlexeyKasianenko

When editing an item (any item):

  • Check to see if that item is part of a kit
  • If it is part of a kit, re-calculate the total market value of that kit and save it
  • So editing a single item that is a component of many kits will update all of those kits with the new market value

@AlexeyKasianenko says they are adding an Update service which will take care of that.

When editing a Kit-Item (so an item that is actually a kit):

  • Hide the "Value per item" edit input
  • Replace it with "Value per item: $x (total of component items)" where $x is the current total of the items, which is what we already stored on the kit-item

awwaiid avatar Oct 05 '25 15:10 awwaiid

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

github-actions[bot] avatar Nov 05 '25 00:11 github-actions[bot]

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Nov 13 '25 00:11 github-actions[bot]