Skip to content
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

Create resource popup shouldn't have quantity #512

Open
fosterlynn opened this issue Jul 6, 2016 · 5 comments
Open

Create resource popup shouldn't have quantity #512

fosterlynn opened this issue Jul 6, 2016 · 5 comments
Labels

Comments

@fosterlynn
Copy link

Created a new resource using button on resource type page, it allowed me to put in a quantity. The quantity got saved as zero though.

@fosterlynn fosterlynn added the bug label Jul 6, 2016
@sqykly
Copy link

sqykly commented Mar 14, 2018

Fixing

sqykly added a commit to sqykly/valuenetwork that referenced this issue Mar 14, 2018
fixes valnet#512 by adding a CreateUnquantifiedResourceForm class and using it in the view code where the quantification is not appropriate according to valnet#512
@sqykly
Copy link

sqykly commented Apr 5, 2018

Now that I'm looking at this code again, what are you hoping to create with said button? A Resource that is an instance of the ResourceType? If so, why can't you instantiate multiple resources of the same type at one time using this form? At first I thought you meant that the form was supposed to generate a new ResourceType in the system, but now I',m not sure._

@fosterlynn
Copy link
Author

First an explanation: One resource can have any quantity, think of it as a stock type resource, like a pallet of 1000 widgets of one type can be one resource. So yes, this creates a resource that is of that resource type.

Background: In all cases, resource quantity should only be created or changed by an economic event. Otherwise there is no audit trail of what happened, as well as no maintenance of the continuity of resource flows, which the model is based on. There is an Adjust button where people can change quantity of an existing resource (recount of inventory for example), which creates an event to change the quantity. This button you are looking at does not create an event, so it needs to create a zero quantity resource. The zero quantity resource can then be acted on by an event.

Probably the main use case is when people are starting up the system and need to enter all the existing resources - they would use this then the Adjust button. Another possible use case is if someone were setting up a bin or other place for a resource to exist later, and they could create that resource with zero quantity so it is done already.

So, without doing any redesign, the solution is to take off the quantity field from that form - making sure it isn't used elsewhere of course :).

@bhaugen
Copy link

bhaugen commented Apr 5, 2018 via email

@sqykly
Copy link

sqykly commented Apr 6, 2018

Ah, that makes sense. Thought I had this one kicked, will need to fix the fix after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants