Rothamsted-Ecoinformatics / farm_rothamsted

Custom farmOS features for Rothamsted Research.
GNU General Public License v2.0
6 stars 1 forks source link

FarmOS 3.0: Confusion in moving locations #614

Closed aislinnpearson closed 7 months ago

aislinnpearson commented 7 months ago

I was a bit confused about how the movement location quick form works, and if the below was an error or a misinterpretation on my part.

I created this asset here, which appears under All Locations: https://pr-12-qcotibq-2mu45anerqtvq.uk-1.platformsh.site/asset/232

image

When I want to move it via Toggle drag and drop it initial lets me move it:

image

But when I press save I get this error:

image

I then tried moving the asset with the movement quick form (@paul121 has since told me this doesn't work if an asset is fixed, which this is, but I include it for completeness in terms of how I thought about the problem):

image

The movement quick form submitted successfully, and the log exists with the new location: https://pr-12-qcotibq-2mu45anerqtvq.uk-1.platformsh.site/log/35

image

image

But the location hasn't actually changed. For this I had to change the parent (which I guess is different from the location?)

I then tried to use the Movement quick form to move a plant asset and again the quick form submitted: https://pr-12-qcotibq-2mu45anerqtvq.uk-1.platformsh.site/log/36

image

But the location of the asset itself hasn't changed: https://pr-12-qcotibq-2mu45anerqtvq.uk-1.platformsh.site/asset/39

![Uploading image.png…]()

I have full admin rights, so I don't think that was the limitation...

paul121 commented 7 months ago

Hey thanks for documenting this @aislinnpearson , you found a bug in the location hierarchy form! We'll get this fixed soon.

Otherwise, the movement quick form and movement logs are working as designed. Fixed assets will always use their intrinsic geometry as the defined location. Typically fixed assets will be have a parent location (also fixed) that is used to build a hierarchy of locations. Otherwise, the movement logs can be used to update "movable" (non-fixed) assets. You may be interested in this documentation of this Location Logic

aislinnpearson commented 7 months ago

This sounds good to me @paul121. I wonder if that should be a warning or error that appears if you attempt to submit a movement quick form for a fixed location asset? That was what really confused me - that the form would submit (or if it doesn't want to submit it would be nice to know why?)