Misc assay issues fixes for 25.7 - part 3#6795
Conversation
| public static String generateFileName(ExpProtocol protocol, boolean shouldEncode) | ||
| { | ||
| Date dateCreated = new Date(); | ||
| String dateString = DateUtil.formatDateTime(dateCreated, "yyy-MM-dd-HHmmss"); |
There was a problem hiding this comment.
Should we be using the container configured dateTime format string, or do we care?
There was a problem hiding this comment.
This is an interesting decision point. Feels like having these hard-coded to a single format will be more stable, however, I can understand wanting to align it with user date reading. Are there other places we've had to make a similar decision? Perhaps @labkey-jeckels has thoughts.
There was a problem hiding this comment.
We do something similar with a hardcoded format (ISO, with substitutions to make it filename friendly) in FileUtil.makeFileNameWithTimestamp(). Maybe we should use that here.
I haven't heard any requests to use the configured date/time formats.
There was a problem hiding this comment.
I like the idea to use FileUtil.makeFileNameWithTimestamp() here. It has the added benefit of removing the custom code for converting/encoding characters for the file name. Done.
| String oldAssayName = null; | ||
|
|
||
| // Issue 51321: check reserved domain name: First, All | ||
| if ("First".equalsIgnoreCase(assay.getName()) || "All".equalsIgnoreCase(assay.getName())) |
There was a problem hiding this comment.
I've seen a number of places where we check for these strings. Would it make sense to introduce enums or constants or consolidate the checks?
There was a problem hiding this comment.
Good idea. Consolidated checks into DomainUtil.validateReservedName
…stamp and FileUtil.getTimestamp
…l.validateReservedName
Rationale
#763: App assay creation allows for assay names that only differ by casing
#795: LKS Schema Browser "missing schema" error when assay name has special characters
Issue 52075: labkey default assay run IDs replace all special characters in the assay name with underscores
Issue 53355: check for null schema
Related Pull Requests
Changes