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

[Frontend][Backend] duplicate an exercise #1159

Merged
merged 65 commits into from
Jul 15, 2024

Conversation

Christian-DONGMO
Copy link
Contributor

@Christian-DONGMO Christian-DONGMO commented Jun 26, 2024

Proposed changes

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

…into issue/1057_Duplicate-an-exercise

# Conflicts:
#	openbas-front/src/admin/components/simulations/ExerciseList.tsx
Changing the popover on exercises, atomic testing and scenarios
Creating duplicate dialog
Changing the popover on exercises, atomic testing and scenarios
Implementing duplication on Atomic testing
Implementing duplication on Atomic testing
Changing the popover on exercises
Changing the popover on scenario
Duplicating atomic testing
Duplicating atomic testing
Duplicating exercises and scenarios
Duplicating injects into exercises and scenarios
Duplicating injects into exercises and scenarios
Duplicating exercises and scenarios
@Christian-DONGMO Christian-DONGMO added the filigran team use to identify PR from the Filigran team label Jun 26, 2024
@Christian-DONGMO Christian-DONGMO added this to the Release 1.2.0 milestone Jun 26, 2024
…into issue/1057_Duplicate-an-exercise

# Conflicts:
#	openbas-front/src/admin/components/atomic_testings/InjectList.tsx
#	openbas-front/src/admin/components/scenarios/Scenarios.tsx
Copy link
Member

@Dimfacion Dimfacion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When testing I had 400 errors on duplicate exercises with the following message :
{ "code": 400, "message": "Validation Failed", "errors": { "children": { "exercise_name": { "errors": [ "This value should not be blank." ] } } } }

Duplicate on simulations works but the modal never closes on success.

Duplicate on Injects and Atomic Testing works as expected.

correcting tests in error
@SamuelHassine SamuelHassine removed this from the Release 1.2.0 milestone Jun 26, 2024
fixing errors found during code review
fixing errors found during code review
…into issue/1057_Duplicate-an-exercise

# Conflicts:
#	openbas-api/src/main/java/io/openbas/service/AtomicTestingService.java
fixing errors found during code review
fixing errors found during code review
fixing errors found during code review
…into issue/1057_Duplicate-an-exercise

# Conflicts:
#	openbas-api/src/main/java/io/openbas/service/AtomicTestingService.java
fixing errors found during code review
fixing errors found during code review
@RomuDeuxfois RomuDeuxfois linked an issue Jul 8, 2024 that may be closed by this pull request
@RomuDeuxfois
Copy link
Member

RomuDeuxfois commented Jul 8, 2024

@Christian-DONGMO I still have some bugs

  • Atomic Testing
    When I duplicate an atomic testing with a tag, this tag is not in the duplicate atomic testing

  • Simulation ->
    When I create a simulation, I have a 5OO Internal Error
    Cannot invoke "io.openbas.database.raw.RawExercise.getInject_ids()" because "rawExercise" is null

  • Scenario ->
    I have a new background color in the table, why ?
    image
    Variables are not duplicated

…into issue/1057_Duplicate-an-exercise

# Conflicts:
#	openbas-front/src/admin/components/scenarios/Scenarios.tsx
@RomuDeuxfois
Copy link
Member

@Christian-DONGMO I still have one bug

  • Simulations Injects
    I create a simulation with a media pressure inject and a media pressure.
    image
    image
    When I duplicate this simulation and I update the media pressure by changing his name
    image
    The media pressure in the Definition seems to be the one in the base scenario (the name is the old one AND we have the mention: Not used in the context)
    image

@RomuDeuxfois
Copy link
Member

@Christian-DONGMO
The media pressure is well duplicated now, but the documents that were attached are not linked.
image
image

@RomuDeuxfois RomuDeuxfois requested a review from savacano28 July 15, 2024 08:46
@RomuDeuxfois RomuDeuxfois dismissed stale reviews from savacano28 and Dimfacion July 15, 2024 08:46

All bugs have been addressed

@Christian-DONGMO Christian-DONGMO merged commit 9e69425 into master Jul 15, 2024
6 checks passed
@Christian-DONGMO Christian-DONGMO added this to the Release 1.3.0 milestone Jul 15, 2024
@Christian-DONGMO Christian-DONGMO deleted the issue/1057_Duplicate-an-exercise branch July 15, 2024 08:53
@Christian-DONGMO Christian-DONGMO self-assigned this Jul 15, 2024
@SamuelHassine SamuelHassine removed this from the Release 1.3.0 milestone Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate an Inject, Scenario, Simulation & Atomic testing
5 participants