As a curator
I want to know that if I rerun the readme-generator script on a dataset that already has a readme file, then the comments section is maintained in the new readme from the original readme
So that we do not lose bespoke comments previously added
Acceptance criteria
Given a dataset exists
And it contains a readme_123456.txt file with text in the comment section
When I rerun the readme generator script
Then the newly generated readme_123456.txt file includes the original comment section
Given legacy comments exist
When I run a migration script
Then the legacy comments are stored in the database using the new model
Additional Info
This is related to #1153
This is related to #154
The solution to this issue maybe to include the "comment" text within the database somewhere? There is already a DATASET_ATTRIBUTES table that could include the 'comment' attribute (from ATTRIBUTE table) and the value for that could be the text in the comment field of the readme_123456.txt file?
UI for generate a comment
In the dataset admin form, add a comment text field above "URL to redirect" field and ensure it is saved as the value of in dataset_attributes table with attribute id (325) from the attribute table's comment.
Add a little (i) icon (and maybe hovering tool tip) to explain what that field is for.
Migration of existing readme file with comments:
extract all text between [Comments] and [End] in all readme file named like "readme_DOI.txt" and save it the dataset_attributes table with attribute id (325) from the attribute table's comment and captured text as value
readme generator needs to generate a file named "readme_DOI.txt" and update (or add in the case of old readme files that dont follow that naming pattern) entry for it in the File table, calculate and save in that table the file size and generate MD5 checksum (and save as file attribute, overwriting the existing one)
readme generator needs to upload the generated readme file to the appropriate public dataset location in wasabi
run the readme generator on all the DOIs.
The Attribute.php and DatasetAttributes Yii1 models need to have Yii2 counterpart in gigadb/app/models (you can use the gii command line tool to generate them)
Also implement #1265
Product Backlog Item Ready Checklist
[ ] Business value is clearly articulated
[ ] Item is understood enough by the IT team so it can make an informed decision as to whether it can complete this item
[ ] Dependencies are identified and no external dependencies would block this item from being completed
[ ] At the time of the scheduled sprint, the IT team has the appropriate composition to complete this item
[ ] This item is estimated and small enough to comfortably be completed in one sprint
[ ] Acceptance criteria are clear and testable
[ ] Performance criteria, if any, are defined and testable
[ ] The Scrum team understands how to demonstrate this item at the sprint review
Product Backlog Item Done Checklist
[ ] Item(s) in increment pass all Acceptance Criteria
[ ] Code is refactored to best practices and coding standards
[ ] Documentation is updated as needed
[ ] Data security has not been compromised (with particular reference to the personal information we hold in GigaDB)
[ ] No deviation from the team technology stack and software architecture has been introduced
[ ] The product is in a releasable state (i.e. the increment has not broken anything)
User story
Acceptance criteria
Additional Info
This is related to #1153 This is related to #154 The solution to this issue maybe to include the "comment" text within the database somewhere? There is already a DATASET_ATTRIBUTES table that could include the 'comment' attribute (from ATTRIBUTE table) and the value for that could be the text in the comment field of the readme_123456.txt file?
UI for generate a comment
In the dataset admin form, add a comment text field above "URL to redirect" field and ensure it is saved as the value of in
dataset_attributes
table with attribute id (325) from the attribute table'scomment
. Add a little (i) icon (and maybe hovering tool tip) to explain what that field is for.Migration of existing readme file with comments:
dataset_attributes
table with attribute id (325) from the attribute table'scomment
and captured text asvalue
Attribute.php
andDatasetAttributes
Yii1 models need to have Yii2 counterpart ingigadb/app/models
(you can use thegii
command line tool to generate them)Product Backlog Item Ready Checklist
Product Backlog Item Done Checklist