brainthee / CHAOTICA

Centralised Hub for Assigning Operational Tasks, Interactive Calendaring and Alerts.
https://chaotica.app
GNU General Public License v3.0
4 stars 1 forks source link

[Bug] Add a Job Function Fails #62

Closed tevers200 closed 6 months ago

tevers200 commented 6 months ago

When adding a new job, the POST request fails to create the job in the latest version (worked fine in previous releases).

"POST /job/create/ HTTP/1.1" 200 53592 image

Hitting the "Save" button sends a POST request to /job/create, but then reloads the page as it was prior to submission.

brainthee commented 6 months ago

Well that was a fun puzzle! Turns out it was failing due to form validation checks. Which wasn't being displayed!

it's failing out on this:

created_by
This field is required.
brainthee commented 6 months ago

So because created_by isn't shown in the form (since it's not a user-controlled field) - it's not rendered out!

brainthee commented 6 months ago

Turns out it was due to some dynamic field locking I added a few commits ago. Added the relevant fields to excluded for both jobs and phases (it affected phases too)