tair / toastdos-back

The back-end system for the GOAT community annotation tool
GNU General Public License v3.0
7 stars 0 forks source link

Data validation/error messages not displaying for incomplete annotations on submission page #331

Closed lreiser closed 5 years ago

lreiser commented 5 years ago

Submitters should not be able to create an annotation that is lacking

If one of the required fields is missing, an informative error message should appear if 1 the submitter tries to create another annotation and the previous annotation is incomplete 2 the submitter clicks review submission and one of the annotations is missing data

Try creating an annotation on http://toastdos.phoenixbioinformatics.org/

1.Login 2.Enter PMID = 27095837

  1. Enter Locus=AT5G37820
  2. Click add Annotation and create Process Annotation 5.Enter term=leaf development
  3. Click Review Submission

You should see an error message pop up indicating method is required see screenshots attached for examples. notermerror nomethoderror

JKingSE commented 5 years ago

319 These issues are related, although this one includes one more use case.

lreiser commented 5 years ago

yes sorry it is more or less a duplicate.

lreiser commented 5 years ago

I am thinking that enforcing the validation step before getting to the review submission phase would eliminate a lot of the subsequent issues surrounding submission review.

qwertyflagstop commented 5 years ago

Pushed a fix. Needs review

lreiser commented 5 years ago

I don't think this is working or perhaps not in all the right places. I was able to move to the review screen from submission without actually entering in an annotation. There should have been an error reported.

screenshot_1611

The production version includes visual highlights screenshot_1613

But to be fair the pop up/tooltips are not displayed consistently in Production.

lreiser commented 5 years ago

Errors on submission page that should generate a warning

  1. No Publication Entered (DOI or PMID is required)
  2. Invalid publication ID
  3. Invalid gene name ( validate name when adding a gene or when adding a name to evidence with)
  4. Missing term in annotation field (term is required)
  5. Missing evidence in annotation field (evidence is required)
  6. Missing Evidence with for IGI and ISS annotations (gene id is required)
  7. Must have at least ONE complete annotation in order to review/submit. Can be of any type (comment, GO or PO)

for 5 and 6 there must be SOME value entered there but the values do NOT have to correspond to existing terms in the database.

lreiser commented 5 years ago

Partially fixed

  1. No Publication Entered (DOI or PMID is required)
  2. Invalid publication ID
  3. Invalid gene name ( validate name when adding a gene or when adding a name to evidence with)
  4. Missing term in annotation field (term is required)
  5. Missing evidence in annotation field (evidence is required)

all display error messages. However, item 6 condition was not met. I was able to move on to the submission review page without adding required 'evidence with' then when I tried to submit the annotations there was an error - the message displayed was [object ProgressEvent]

screenshot_1626

JKingSE commented 5 years ago

The types of annotations I tried with missing information gave errors correctly and showed more informational error messages. I can't guarantee I got every type of error though, this is something that will need more testing by sponsors as well.

JKingSE commented 5 years ago

Evidence with currently allows an empty field to be sent through if nothing was entered.

lreiser commented 5 years ago

Error message conditions are met. screenshot_1657 screenshot_1658 screenshot_1659