Multiple attachment error in batch import, when Catalog Number is Regex Formatted

Dear all,

We are using the latest 7.12 version of Specify.

We have formatted our Catalog Number field to accommodate a constant (MMPA) and a regex (a 5 digit number and optionally followed by a dot and a number, and additionally, another optional dot and a number -those optional numbers can be roman numerals as well-), as follows:

When using the Attachment Batch Import functionality, if an attachment with a filename matching an existing catalog number (e.g. MMPA00001.jpg), is added, the system recognises it as correctly formatted and successfully maps it to the proper collection object, after validation. However, when multiple attachments for the same collection object are added, using an underscore in their filename (i.e. MMPA00001_frontal.jpg ), the system does not recognise them as correctly formatted.

In a different collection which uses a Constant, Separator and Numeric field as Catalog Number formatting, the system successfully recognises additional attachments to the same collection object having underscores in their filename.

Thus, we were wondering whether the Regex formatting messes up the mutliple attachment underscore matching, and whether there is a fix to this issue, in our case.

Thank you in advance.

Best Regards.

Vasileios

Hi @vzogopoulos,

Thanks for this information!

After testing, we found that this is indeed a bug with regex field formats. It has been reported to GitHub as #8097.

Until this can be fixed in a future release, there are a few ways to work around this:

  1. Select the AltCatalogNumber import path for Collection Object (CO). You will first use Batch Edit to add a unique AltCatalogNumber value (without regex) to your COs. AltCatalogNumber can then be used as the identifier for attachment uploads. Note: this will require renaming all attachment files.

  2. Import attachments in batches. For records with multiple attachments, upload the remaining files in separate batch upload data sets. Note: this will require renaming the files between uploads.

  3. You could also do the initial upload with a single attachment per record followed by manual attachment uploads through the forms. This would preserve the current file naming system.