Closed bwbaker1 closed 3 months ago
Hi @bwbaker1, is the goal here to make sure that no two document titles are the same, or that ATBDs follow a standardized naming convention/format? Depending on the goal, we could approach this differently.
If we were to enforce unique titles, I think we could do so similarly to how we check for unique aliases.
@thenav56 is that correct?
If so, we would also need to think about how to handle existing document titles.
Yes, we can add a unique title check to the API, similar to the alias check. We have separate APIs for ATBD and its versions, so adding this new check won't affect existing ATBDs until they are updated.
@wrynearson The goal is to make sure no two documents have the same title.
@thenav56 That is good to know because it is best if existing documents are not affected until they are updated.
Thanks for the quick responses!
@bwbaker1, this is ready to go on staging, but we'll wait to merge it until you decide the best way to notify users that their ATBD titles should be changed. I assume you'd ask the ones that need to be renamed to do so, but other solutions could work.
@wrynearson I will send an email and let the users know. This can be merged into staging. Also, is there an error message provided when a title is not unique? Perhaps something such as "The provided ATBD title is not available. Titles must be unique."
I've updated the names of documents to be unique on staging except for two, which share the "Untitled Document" title. Here are the issues:
We need to rename one of these documents before merging https://github.com/NASA-IMPACT/nasa-apt/pull/880
For https://nasa-apt.surge.sh/documents/123/v1.0, it looks like it's not in the database, but the frontend shows it in the dashboard...
Description
Currently there is no ATBD naming conventions but is needed. Scientists are naming completely different ATBDs the exact same or mostly the same. For example, Inherent Optical Properties and Inherent Optical Properties (IOPs) are different ATBDs. These examples are the same scientist/science team, but this could be an issue with other science teams also producing a similar ATBD.
One solution is to force all ATBD titles to be unique similar to how the ATBD alias currently are. However, that may bring up other issues further down the line.
Acceptance Criteria