Migrated file version increment
Uploading a new version of a file to a migrated book can have incorrect versionName increment
Steps to reproduce
- Migrated files from old cms can have a versionName that's higher than the number of versions of the file that were migrated
- uploading a new version of the file increments based on the amount of versions instead of the max versionName
Possible solution
versionName should be increment based on maxElement.versionName+1 instead
Priority
- Resolving this bug is required for migration (Y)
- This can be prioritised after migration (N)
QA steps
1- Upload the files in different sections for the each type of book (source, converted,suppl, support, bookshelf pdfs, images). This will increment by one the file version (y) which is Vx.y.
2- NCBI migrates some files from their old cms and confirm that the version will match with the max versionName.