National-Forestry-Authority / farmers

0 stars 1 forks source link

Current farmer is not retrieved on edit forms #3

Open pcambra opened 3 years ago

pcambra commented 3 years ago

The site does not remember the farmer identify of the record being edited, and once a form is saved, the record has to be retrieved in order to be further viewed and edited again.

Any page / form being edited, once saved, should retain the current (farmer) record, to avoid having to search for and retrieve it again.

pcambra commented 3 years ago

@LeScruf mind clarifying the flow to reproduce this issue? Wondering if this is just a default wrongly set.

marcoscano commented 3 years ago

I'm going through the issues triaging them, and this one seems to be waiting for additional info/clarification. Adding the "Needs additional info" label, feel free to remove it if that's not the case.

pcambra commented 3 years ago

@marcoscano this is sitewide, if you go to Page: http://dev-hsk.nfa-fmis.net/tree-farmer-overview/licences?title=Test%20farmer and add an offer/license, when closing you're back in http://dev-hsk.nfa-fmis.net/tree-farmer-overview instead of the current farmer

LeScruf commented 3 years ago

This doesn't seem to be working correctly yet - check out the behaviour - using 'test farmer' upon updating a record. It seems that on saving an edit to the record (e.g. Tree farmer details) - the active record is reverting (in this case) to KALIKUMUTIMA DEO

pcambra commented 3 years ago

@LeScruf this hasn't been deployed yet :) sorry for the confusion

pcambra commented 3 years ago

@LeScruf this has been deployed now, could you please check again? thanks!

pcambra commented 3 years ago

@peacog it seems when you go to Accounts, Fees, and edit a charge, your farmer is gone. We need to review overall the redirections on the forms

peacog commented 3 years ago

@pcambra The problem was due to the farmer search form being submitted via ajax. The farmer name query string was not being added to the request stack, so the first form that tried to retrieve the name would get nothing. The problem was solved by disabling ajax on the farmer search form

peacog commented 3 years ago

Hi @LeScruf We've fixed this problem by disabling the ajax loading of the searched for farmer. Please review when you have a moment