Skip to content

Conversation

@anonymoususer72041
Copy link
Contributor

This PR fixes an issue where editing an Activity could unintentionally reset the "Regarding" field from a specific Job Order to "General". The root cause was fragile preselection logic in the edit UI that relied on comparing rendered text, which could fail (for example when the dropdown option text includes markers like (*)).

The edit modal now preselects the correct Job Order using the underlying jobOrderID rather than display text. In addition, saving "General" is normalized so that activity.joborder_id is persisted as SQL NULL instead of inconsistent sentinel values created by legacy paths (such as 0 or -1).

Finally, the PR includes a schema migration that updates existing rows and converts legacy activity.joborder_id values of 0 and -1 to NULL, ensuring "General" is represented consistently across old and new data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant