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

Exporting a .cairis or .xml file with using "&" in a task, asset, use-case #566

Closed
pauldavidjarvis opened this issue Oct 4, 2020 · 2 comments

Comments

@pauldavidjarvis
Copy link

pauldavidjarvis commented Oct 4, 2020

Expected behaviour

Exports correctly with all tasks, assets and use-cases involving the symbol "&"
maintained and the ability to import it without issue.

Actual behaviour

CAIRIS

Importing a .cairis file results in an error code with only "X" and no information.
Importing a .xml file results in an error code "Error parsing/tmp/tmp0cvg0zoh.xml: not well-formed (invalid token)"

Excel

As an XML table

XML Import Error - XML Parse Error - Import Status: Failed

As a read-only workbook

Excel Error Popup: "File cannot be opened because:
Whitespace is not allowed at this location.
Line 211, Position 24.
asset name="Pictures & Videos" short_code="P&V" type="Infomration" is_critical="0"'"

Use the XML Source task pane

Error in XML: Cannot load the specified XML or schema source.

Steps to reproduce the behaviour

Create a project involving any task, assets and use-cases that involve the AND symbol in their name.

Version of CAIRIS

Unsure.

Details of browser or, if applicable, details of the OS used to host CAIRIS

Google Chrome Version 85.0.4138.121 (Official Build) (64-bit)
Running CAIRIS from BU Server

Additional Information: Solution

Opening the XML file within Notepad++ and removing all traces of any asset, use-case or task that had "&" in its name.

@failys
Copy link
Collaborator

failys commented Oct 4, 2020

Ampersands are considered reserved characters in object names: https://cairis.readthedocs.io/en/latest/reserved.html

There is no easy way to stop people adding these via the UI or directly to the model files. However, on reflection, we could at least tell people when trying to export their models that these characters have creeped into the objects names. Let me take a look and see what I can do... In the meantime, the work around is to avoid reserved characters in object names.

@failys
Copy link
Collaborator

failys commented Oct 5, 2020

I've pushed an update which should stop you exporting models where object names contained reserved characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants