-
Notifications
You must be signed in to change notification settings - Fork 25
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
Comments
Fixing |
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
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._ |
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 :). |
From the viewpoint of the logical consistency of the model, you should
always be able to recreate the current state of a resource from the history
of economic events that affected it. Bill McCarthy, who created the model,
never instantiates resources at all: always computes the current balance
from event history. Another potential implementation in a decentralized
social network (Scuttlebutt) plans to do the same.
…On Thu, Apr 5, 2018 at 8:22 AM, Lynn Foster ***@***.***> wrote:
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 :).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#512 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHKv36xqvedX7Z9yyjJvlzThdpueeKsks5tlhqdgaJpZM4JGdsV>
.
|
Ah, that makes sense. Thought I had this one kicked, will need to fix the fix after all. |
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.
The text was updated successfully, but these errors were encountered: