gigascience / gigadb-website

Source code for running GigaDB
http://gigadb.org
GNU General Public License v3.0
9 stars 14 forks source link

bug in file admin page updates made for v4.3.6 #2029

Open only1chunts opened 6 days ago

only1chunts commented 6 days ago

Testing the staging environment for the v4.3.6 release I spotted an issue that requires investigation:

I opened this file admin page : https://staging.gigadb.org/adminFile/update/id/539458 I clicked the "Show new attributes" button to see the newly labelled "add attributes" button I then clicked the "Edit" button next to the existing MD5 value attribute to see the "add attribute" button there, both looked fine, Then I entered a new attribute and tried to save that and instead of adding the new attribute it made a duplicate of the already existing MD5 value attribute?!

image

However, I then went back and tried to add a new attribute without clicking the "edit" button AS WELL. and the function worked as expected. so its an odd scenario that I accidentally created by clicking both the edit and the add buttons! but we should create a criteria to prevent that from happening. If I can do it accidentaly then someone else will!

User story

As a curator I want to see a clean intuitive design when I make File Attribute updates So that its simple to use without confusion

Acceptance criteria

Given I am on a File admin page (e.g. https://gigadb.org/adminFile/update/id/96250) When I click the "Edit" button on an existing file attribute Then I should see a "Save Attribute" button next to edit attributes fields

Given I am on a File admin page (e.g. https://gigadb.org/adminFile/update/id/96250) When I click the "Edit" button on an existing file attribute And I click the "Show new attribute field" button on an existing file attribute And I fill in the value for the new attribute And I click "Add attribute" Then thew new file attribute should be added to the database And no existing file attributes should be duplicated

Given I am on a File admin page (e.g. https://gigadb.org/adminFile/update/id/96250) And the form area for adding new attribute is shown to the user When I click the "Edit" button on an existing file attribute Then the form area for adding new attribute becomes hidden And the form area for the existing file attribute to be edited is shown to the user

Given I am on a File admin page (e.g. https://gigadb.org/adminFile/update/id/96250) And the form area for an existing file attribute to be edited is shown to the user When I click the "Show new attribute field" button Then the form area for the existing file attribute to be edited becomes hidden And the form area for adding new attribute is shown to the user

Additional Info

Product Backlog Item Ready Checklist

Product Backlog Item Done Checklist

rija commented 6 days ago

To be extra precise, the problem happen when both the Edit form and the "Show new attribute fields" are open. We need to ensure opening one will close the other maybe

rija commented 6 days ago

Hi @luistoptal

can you have a look at this when you get a moment.

rija commented 6 days ago

this is an issue that stem from deploying the fix to #1858 on staging