Skip to content

Cryptic Validation message when required numbering field is omitted #872

@maxpatiiuk

Description

@maxpatiiuk

Missing required field causes a cryptic error messages:

Screen Shot 2021-06-26 at 4 36 43 PM

Data set:

{
  "id": 13,
  "name": "New Data Set Sat Jun 26 2021",
  "columns": [
    "Agent Last Name",
    "Agent Last Name #2",
    "Date Accessioned"
  ],
  "visualorder": [
    0,
    1,
    2
  ],
  "rows": [
    [
      "1",
      "1",
      "3",
      "{\"disambiguation\":{}}"
    ]
  ],
  "uploadplan": {
    "baseTableName": "accession",
    "uploadable": {
      "uploadTable": {
        "wbcols": {
          "dateaccessioned": "Date Accessioned"
        },
        "static": {},
        "toOne": {},
        "toMany": {
          "accessionagents": [
            {
              "wbcols": {},
              "static": {},
              "toOne": {
                "agent": {
                  "uploadTable": {
                    "wbcols": {
                      "lastname": "Agent Last Name"
                    },
                    "static": {},
                    "toOne": {},
                    "toMany": {}
                  }
                }
              }
            },
            {
              "wbcols": {},
              "static": {},
              "toOne": {
                "agent": {
                  "uploadTable": {
                    "wbcols": {
                      "lastname": "Agent Last Name #2"
                    },
                    "static": {},
                    "toOne": {},
                    "toMany": {}
                  }
                }
              }
            }
          ]
        }
      }
    }
  },
  "uploaderstatus": null,
  "uploadresult": null,
  "rowresults": [
    {
      "UploadResult": {
        "record_result": {
          "Uploaded": {
            "id": 45,
            "info": {
              "tableName": "Accession",
              "columns": [
                "Date Accessioned"
              ],
              "treeInfo": null
            },
            "picklistAdditions": []
          }
        },
        "toOne": {},
        "toMany": {
          "accessionagents": [
            {
              "UploadResult": {
                "record_result": {
                  "Uploaded": {
                    "id": 5,
                    "info": {
                      "tableName": "Accessionagent",
                      "columns": [],
                      "treeInfo": null
                    },
                    "picklistAdditions": []
                  }
                },
                "toOne": {
                  "agent": {
                    "UploadResult": {
                      "record_result": {
                        "Matched": {
                          "id": 160,
                          "info": {
                            "tableName": "Agent",
                            "columns": [
                              "Agent Last Name"
                            ],
                            "treeInfo": null
                          }
                        }
                      },
                      "toOne": {},
                      "toMany": {}
                    }
                  }
                },
                "toMany": {}
              }
            },
            {
              "UploadResult": {
                "record_result": {
                  "FailedBusinessRule": {
                    "message": "(1062, \"Duplicate entry '160-45' for key 'Role'\")",
                    "info": {
                      "tableName": "Accessionagent",
                      "columns": [],
                      "treeInfo": null
                    }
                  }
                },
                "toOne": {
                  "agent": {
                    "UploadResult": {
                      "record_result": {
                        "Matched": {
                          "id": 160,
                          "info": {
                            "tableName": "Agent",
                            "columns": [
                              "Agent Last Name #2"
                            ],
                            "treeInfo": null
                          }
                        }
                      },
                      "toOne": {},
                      "toMany": {}
                    }
                  }
                },
                "toMany": {}
              }
            }
          ]
        }
      }
    }
  ],
  "remarks": null,
  "importedfilename": "",
  "timestampcreated": "2021-06-26T10:40:39.416",
  "timestampmodified": "2021-06-26T10:52:56.763",
  "createdbyagent": "/api/specify/agent/1/",
  "modifiedbyagent": "/api/specify/agent/1/"
}

Originally posted by @maxpatiiuk in #777 (comment)

Metadata

Metadata

Assignees

Labels

1 - RequestA request made by a member of the community2 - WorkBenchIssues that are related to the WorkBench

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions