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

Add object name validation to fact input in scenario editor #571

Open
foxcoleman opened this issue Jul 20, 2023 · 3 comments
Open

Add object name validation to fact input in scenario editor #571

foxcoleman opened this issue Jul 20, 2023 · 3 comments
Labels
enhancement New feature or request scenario editor Dealing with the scenario editor

Comments

@foxcoleman
Copy link

I made test with the following titles:

(a) "meets_definition_s12_1"
(b) "meets_definition_s16_1"
(c) "meets_definition_s17"
(d) "meets_definition_s19"
(e) "meets_definition_s26"
(f) "meets_definition_s28"
(g) "meets_definition_s34"

Test (a) and (b) didn't work, but all the other ones did. I changed their titles to (a) "meets_definition_s12_p1"
and (b) "meets_definition_s16_p1". Now they work.

@Gauntlet173 Gauntlet173 added bug Something isn't working web app Dealing with the web interface labels Jul 20, 2023
@Gauntlet173
Copy link
Contributor

I'm not able to duplicate this problem. I created a test called test_2 inside the rock paper scissors act, identical to the who_wins test, and it works fine. Can you give me some more details, or the code that is generating the problem?

@foxcoleman
Copy link
Author

MinorWorksOrderBroken.txt
Here is the code. You will first need to change the attribute under 12(1) called "erosion-protection_work" to "erosion_protection_work" to get the Scenario Editor working again (see Issue 551). Once that's done, click on the test called "requirement_to_deposit_information", and there should be some pre-filled facts in there. Delete the two "it is uncertain whether project" facts, add 12(1) and 16(1), and then run - the answer will not provide explanations through these two facts. If you change the titles of these facts as described above, it works.

@Gauntlet173
Copy link
Contributor

Oh, the FACTS are named that way... the title said the "test" was named that way.

Yeah, the "underscore followed by numerals" is a pattern that is used by s(CASP) to create internal variables that the user isn't supposed to see, so it won't work. That's a poor choice on the part of the s(CASP) developers, but it's a known problem. The validation feature that was added to the code editor prevents you from creating object names in that pattern for exactly that reason.

So the problem here is that we need to add that sort of validation to the scenario editor. I'll edit the title and add that to the improvements list.

@Gauntlet173 Gauntlet173 added enhancement New feature or request scenario editor Dealing with the scenario editor and removed bug Something isn't working web app Dealing with the web interface labels Jul 21, 2023
@Gauntlet173 Gauntlet173 changed the title Test names cannot finish with "underscore + number", but they can finish with "underscore + letter + number" Add object name validation to fact input in scenario editor Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scenario editor Dealing with the scenario editor
Projects
None yet
Development

No branches or pull requests

2 participants