Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepend source UUID to external docs' file name #28

Open
okworx opened this issue Sep 30, 2017 · 0 comments
Open

prepend source UUID to external docs' file name #28

okworx opened this issue Sep 30, 2017 · 0 comments
Milestone

Comments

@okworx
Copy link
Collaborator

okworx commented Sep 30, 2017

Issue

Currently, when external docs are stored in a ZIP file for export, they are simply written to the external_docs folder.

Now there may be collisions if a user uses the same file name for different external docs, which will cause a conflict during export. Consider the following example:

Source dataset A (UUID c50ec8b7-691d-458b-8379-a8d787e4e4b4)

  • attached diagram for product system "electricity mix" (file name flow_chart.png)

Source dataset B (UUID 9bf38b43-d3f5-4f94-99b3-178531ea74bb)

  • attached diagram for product system "process steam" (file name flow_chart.png)

When these datasets are exported to the file system, both files flow_chart.png will be written to the external_docs folder, one of them being overwritten with the other.

We can't simply circumvent this at export time by altering file names, since we'd also have to alter the reference in the corresponding source dataset in this case, which is not an option.

Proposed solution

In order to ensure non-ambiguous file names for external docs, in practice it has proven to be effective to append the UUID of the source dataset to the attached external docs. For the example above, this would look like this:

Source dataset A (UUID c50ec8b7-691d-458b-8379-a8d787e4e4b4)

  • attached diagram for product system "electricity mix" (file name flow_chart_c50ec8b7-691d-458b-8379-a8d787e4e4b4.png)

Source dataset B (UUID 9bf38b43-d3f5-4f94-99b3-178531ea74bb)

  • attached diagram for product system "process steam" (file name flow_chart_9bf38b43-d3f5-4f94-99b3-178531ea74bb.png)

Renaming the external doc file would have to happen by the application at the time the file is attached to the source. The user could be offered the option to use the original file name instead (if for example they are certain that the file name is and will always be non-ambiguous, for example if it already contains a UUID), but probably the described approach should be active by default.

This way, a collision could be avoided when exporting to a ZIP file.

This is not a critical issue but as the user base of the tool grows, this would be good to have in the mid-term.

@msrocka msrocka added this to the 7.0.0 milestone Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants