-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relate Categories to a series #414
Relate Categories to a series #414
Conversation
…e.g. Videos which change series. - Also includes a hacky fix for query-strings - Needs a throughouh clean-up
…ted-to-series # Conflicts: # frontend/package-lock.json
- Tests don't run successfully!
If a category belongs to a series, all backend request for labels will now point to the labels of the master category
…e category anymore.
- Also tries to check for "sufficiently equal" categories and link them to series categories - Tries to turn series categories into normal categories if their master is lost
- Fixed potential error with query parameters - Revised getting categories in the frontend - Fixed potential NullPointerException when getting series categoires in the backend - Fixed category equals check in the backend
- Should fix an issue where labels were lost after a series category was turned back into a normal category
This is a temporary workaround for the issue with scales not working correctly with series category. Only meant as a quick fix since the actual fix would probably take way longer, and should be removed after.
* This effectively turns scales global, as every video will fetch all scales * Undoes previous commit "Removed scales from series category" 91b40e7
I just deployed this on SWITCH staging and it revealed some other questionable things in the tool: It initially requests all the scales in the system (which is what we want) and then goes through each scale individually and downloads the scale values for it. This happens in one synchronous request per scale. Since there are apparently somewhere between 300 and 400 scales in the entirety of the SWITCH system, this takes a while. The tool seems to hang, but it will load eventually, so you can still test, @dagraf. But of course this is unacceptable and we need to come up with a solution. 🤔 |
I'm now trying to open a video in the annotation tool. The waiting time is indeed unacceptable. What would you propose how to solve it? |
I am still waiting the video to be loaded... What about making scales not global but "regional" = always belonging to a series? |
I have a few ideas:
The point about the async AJAX requests is one we have to attack at some point, anyway; not only for scales, but for everything. The tool unfortunately makes a lot of synchronous requests, which make the code somewhat simpler, but also rather slow, to the extent where the tool can become unresponsive if a request takes long due to a sudden case of "bad internet", because the request even blocks the rendering thread. Also Chrome warns about deprecating sync AJAX requests for years already; they might just stop working at some point. |
There are a few problems with this:
These two points already make the whole thing at least as complicated as the category/label stuff, but it gets better:
It is probably possible to think through all of this and then carefully implement it using a similar "trick" we use for the categories/labels, i.e. maintaining a copy of every series category per video. We would need to extend it, though, to apply it to scales as well. And that "trick" is already a pretty bad hack, to be honest. I would be very reluctant to add an even bigger version of that on top. In fact, we should probably think about another way to solve the per series categories thing in the long run, but there are quite a few refactorings I would want to do before attempting that. And lastly, due to all the complexities/problems mentioned above, this is not something we can do in the remaining ~10 or probably even in 20 hours. |
- Undid the previous commit for global scales - Will now display modals with warning messages to prevent the user from creating a series category with a scale
...by having them run on the labels of the master series category. But also still creating local copies of labels in case the affinity should change back to a normal video category.
This is only necessary if the function in question refers to `this` at all which is not the case here.
This consolidates some of the information about the video returned by the integration layer and stores them on the global `Video`. This makes it simpler to work with this data in some places.
Bring series categories PR up to date
Series categories review
Intended to solve issue #260.
Categories are only related to the event they've been created on, but this event allows to create category related to the series of the event. A category belonging to a series will appear on all events belonging to that series, and changes made to the category will also be reflected on all events.
Technically, categories got two new fields:
seriesExtId
andseriesCategoryId
. For an normal event category, these will be empty. If a category is related to a series,seriesExtId
will contain the Opencast series UID of the event.seriesCategoryId
will contain the ID of a master category. Changes made to a series category will also be made to the master category, and each updates it's categories based on the master categories. On a master category,seriesCategoryId
is empty.Since this PR requires new database columns, you'll likely have to update your current database: 260_upgrade_skript.zip
TODOs:
Update 15.10:
Bug: The "sufficiently equal" check that should decide whether a non-series category is similar enough to a series category to be related to it, does not work.Bug: Series categories on video "B" will sometimes need two page refreshes before the changes to the series categories made on video "A" are shown. This is the case if video "B" was not the video where the category was changed to be a series category.Update 21.10:
Bug: When a series category is turned back into an event category it may loose it's labels. (When the reference to a series category is lost, the reference to the labels is lost as well. Unlike with categories, the labels are not copied to the video in that case)Update 22.10:
Disabled scales for series categories. Meant as a temporary fix to avoid users running into weird error states, until the actual bug is resolved.Update 26.11:
Update 16.12:
Update 13.01:
Update 15.01:
Update 28.01: