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

Error during modification of information risk #234

Closed
jerolomb opened this issue Jan 13, 2020 · 1 comment
Closed

Error during modification of information risk #234

jerolomb opened this issue Jan 13, 2020 · 1 comment
Assignees
Labels
bug

Comments

@jerolomb
Copy link
Contributor

@jerolomb jerolomb commented Jan 13, 2020

Describe the bug
When you edit an information risk (threat or vulnerability). If the risk is instantiate in the risk analysis it raise an error

To Reproduce

  1. Create a risk analysis like this :
    image

  2. Go to Knowledge base -> information risks

  3. Click on edit on (OV_BATI, MD36,1001)

  4. Change the vulnerability

  5. See error

Expected behavior
Don't see an error, maybe a confirmation message which warn on the fact that the risk is in the analysis and if people agree the modification. Realise the modification.

Don't forget to update the amv_id which cannot be the same because there is a modification.

Desktop (please complete the following information):

Questions Answers
Type of issue Bug
OS version (server) Ubuntu
OS version (client) Win10
PHP version 7.2
MONARC version / git hash 2.9.8 and before
Browser Chrome

Additional context
An exception occurred while executing 'UPDATE amvs SET uuid = ?, vulnerability_id = ?, anr_id = ?, updated_at = ? WHERE uuid = ? AND anr_id = ?' with params ["8c2a87fa-1646-4955-84ae-584788d1cacf", "69fbfdd6-4591-11e9-9173-0800277f0571", 12, "2020-01-13 14:53:59", "7f9fb48e-4f02-11e9-b3ea-0800277f0571", "12"]:↵↵SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (monarc_cli.instances_risks, CONSTRAINT instances_risks_ibfk_5 FOREIGN KEY (amv_id, anr_id) REFERENCES amvs (uuid, anr_id) ON DELETE CASCADE)

@ruslanbaidan ruslanbaidan changed the title Knowledge base -> edit Information risks Error during modification of information risk Jan 14, 2020
@ruslanbaidan ruslanbaidan added this to To do in MONARC Development Overview via automation Jan 14, 2020
@ruslanbaidan ruslanbaidan self-assigned this Jan 14, 2020
@ruslanbaidan ruslanbaidan moved this from To do to High Priority in MONARC Development Overview Jan 14, 2020
@ruslanbaidan ruslanbaidan moved this from High Priority to In progress in MONARC Development Overview Jan 14, 2020
@ruslanbaidan

This comment has been minimized.

Copy link
Contributor

@ruslanbaidan ruslanbaidan commented Jan 20, 2020

@ruslanbaidan ruslanbaidan moved this from In progress to Review in progress in MONARC Development Overview Jan 20, 2020
@ruslanbaidan ruslanbaidan moved this from Review in progress to Reviewer approved in MONARC Development Overview Jan 20, 2020
MONARC Development Overview automation moved this from Review approved to Done (deployed on prod) Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
MONARC Development Overview
  
Done (deployed on prod)
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.