Repository navigation
TestQuestionPool 48016: Fix Global Units In New Questions - #12135
aaronbidzan wants to merge 1 commit into
Conversation
See: https://mantis.ilias.de/view.php?id=48016 When creating a new formula question, the unit picker exposed globally defined units because the unit repository was initialized with consumer id 0, which is the same sentinel used for admin-wide units. New questions now use consumer id -1 until the question is saved and `setId()` assigns the real id, matching the intended import-first workflow for local units.
|
@kergomard gehe ich recht in der Annahme, dass hier @thojou das Review alleine übernehmen muss, weil deine Abwesenheit ansteht? |
kergomard
left a comment
There was a problem hiding this comment.
Thank you very much for the PR @aaronbidzan ! Please do not set -1 as the default value, but null (I know, this is more work, but it is work well invested). -1 as value for none in a language with null-values is a bad convention from where I stand.
This for me looks like it needs to be picked back to all maintained versions, right? In this case the PR MUST be against the lowest version that needs it, otherwise the risk of fuck-ups increases even further, if I'm wrong and this is only trunk, then it is perfect.
@thojou : Please proceed from here, so that we can get this done.
Thanks again and best,
@kergomard
|
I have created a separate PR now pointing to Kind regards, |
See: https://mantis.ilias.de/view.php?id=48016
When creating a new formula question, the unit picker exposed globally defined units because the unit repository was initialized with consumer id 0, which is the same sentinel used for admin-wide units. New questions now use consumer id -1 until the question is saved and
setId()assigns the real id, matching the intended import-first workflow for local units./cc @thojou