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

Adding new Studies in the CSIS #83

Closed
patrickkaleta opened this issue Jul 25, 2019 · 15 comments
Closed

Adding new Studies in the CSIS #83

patrickkaleta opened this issue Jul 25, 2019 · 15 comments
Assignees
Labels
BB: Scenario Management Scenario Management Building Block enhancement New feature or request help wanted Extra attention is needed SHOWSTOPPER Feature or bug, that, if not addressed, renders the CSIS essentially useless

Comments

@patrickkaleta
Copy link
Contributor

"Create new Study" button

I added a new button to create a new Study, which is displayed under all tables listing currently available studies (just for now this button is only visible for admins). It shows a simplified form (following the approach we choose for data packages and resources) asking for:

  • Title
  • Short name
  • Study goal
  • Study type

All remaining fields (Country, Sector, data package, ...) can then be filled in later in the appropriate tabs of the study group.

Updating business rules for automatically creating GL-step entitites

Once user creates a new study, Business rules create the necessary 8 GL-steps in the background and prefill them with the needed data. I updated the corresponding rules to include the Map & Table component and the Scenario Analysis app just like it is currently configured for the first study.

1) HC:
Map app: Characterise Hazard initialised React Map (NodeID: 118)
Table app: Characterise Hazard initialised React table (NodeID: 121)

2) HC-LE:
Map app: Hazard Local Effects initialised React Map (116)
Table app: Hazard Local Effects initialised React table (124)

3) EE:
Map app: Evaluate Exposure initialised React Map (114)
Table app: Exposure initialised react table (122)

4) VA:
Map app: Analyse Vulnerability initialised React Map (120)
Table app: Vulnerability initialised React table (126)
Twins-tab hidden

5) RIA:
Scenario Analysis Application: Scenario Analysis (21)
Map app: Assess Risk and Impact initialised React Map (105)
Table app: Risk and Impact initialised React table (106)
Twins-tab hidden

6) AOI:
Table app: Adaptation Options initialised React table (384)

7) AOA:
nothing yet configured

8) AAPI:
nothing yet configured

I believe that's all that's necessary to create a new study with the same functionality as our currently available Study 1. I created a new Study (everyone with an admin account should be able to view this) and only filled out the initial form so far.

@therter, @p-a-s-c-a-l, @fgeyer16: Are there any other fields in the GL-Steps that need to be automatically filled upon creation, which I might have missed?

Note: Keep in mind the current step-by-step wizard implementation. So right after creating a new study, dont be surprised if only the "Hazard Characterization" step is clickable :-)

@patrickkaleta patrickkaleta added enhancement New feature or request help wanted Extra attention is needed SHOWSTOPPER Feature or bug, that, if not addressed, renders the CSIS essentially useless labels Jul 25, 2019
@patrickkaleta patrickkaleta self-assigned this Jul 25, 2019
@p-a-s-c-a-l p-a-s-c-a-l added this to the D1.4 CLARITY CSIS v2 milestone Jul 26, 2019
@p-a-s-c-a-l
Copy link
Member

So we'll keep the steps? I remember there was a discussion / proposal to remove them entirely. 😕

Anyway. ATM the information in newly created steps is all we need. EMIKAT id is added to the study by this trigger, right?

Note: Eventually we switch from ReactMount to iFrames, then we have to update the default Map and Table Components.

@patrickkaleta
Copy link
Contributor Author

So we'll keep the steps? I remember there was a discussion / proposal to remove them entirely. 😕

I'm aware of the discussion started by @DenoBeno to remove the GL-Step entity type and have it all in the study group. But as you rightly mentioned this would have a major impact on all we have so far developed. So (to my recollection) the conclusion was to continue the way it is right now, while Denis works in parallel on his proposal without disrupting our current implementation.

Anyway. ATM the information in newly created steps is all we need. EMIKAT id is added to the study by this trigger, right?

Correct.

Note: Eventually we switch from ReactMount to iFrames, then we have to update the default Map and Table Components.

Updating the corresponding Business rules to include the updated components is not a problem. For already existing studies with GL-steps showing the then obsolete components, I suggest to update them manually.

@p-a-s-c-a-l p-a-s-c-a-l added the BB: Scenario Management Scenario Management Building Block label Aug 19, 2019
@DenoBeno
Copy link

Last week someone complained that they don't see the "add study" button. (could be false flag too)

Please double-check if this button is shown to all the user types that are allowed to add studies.

@LenaStr
Copy link

LenaStr commented Aug 19, 2019 via email

@p-a-s-c-a-l
Copy link
Member

See #96

@patrickkaleta
Copy link
Contributor Author

Last week someone complained that they don't see the "add study" button. (could be false flag too)

Please double-check if this button is shown to all the user types that are allowed to add studies.

The "Create a new Study" button is currently only visible to administrators and until #90 is fully resolved, I wouldn't change that. In the end I guess every authenticated user (so everyone who has an account) should be able to create a new Study.

@DenoBeno
Copy link

Please note that #90 has been resolved. Now we need testers.

@DenoBeno
Copy link

DenoBeno commented Sep 5, 2019

To the best of my knowledge, adding new studies and changing the study type works as designed now.

@p-a-s-c-a-l
Copy link
Member

I created a new study of type Basic Screening: General by following the create new study link. The result is a study group without navigation tabs:

grafik

@DenoBeno
Copy link

DenoBeno commented Sep 8, 2019

Hm.

The GL-steps are generated as they should, but you should end up on the https://csis.myclimateservice.eu/study//view/intro. However, the https://csis.myclimateservice.eu/study/28/view/intro doesn't exist, because the alias hasn't been generated.

image

It should be, according to
https://csis.myclimateservice.eu/admin/config/search/path/patterns/study_group?destination=/admin/config/search/path/patterns

I run the "bulk generate aliases" and now it's OK. But this shouldn't happen. Is this somehow related to "rules" not working occasionally? Now the bulk path generation occasionally fails too?

@patrickkaleta
Copy link
Contributor Author

Turns out the problem was caused by the Country and the City field, which is a dependent field created with Business Rules. We implemented this dependent field, since it allows to dynamically limit the cities based on the selected country. And for some reasons this dependent field is messing with Pathauto (seems like a new bug and just now a new development version of pathauto was introduced, I will check this out later).

For now, I removed the Country and City selection from the initial form. The URL aliases are now created as expected and the Country and City can still be set in the Context tab of the Study (as it was already the case).

On a related note, I also made the Study type field a requirement, since the new Business rules cannot work without a Study type being selected.

@DenoBeno
Copy link

I just read the initial entry on "Updating business rules for automatically creating GL-step entitites". This is completely outdated now, it would be good to close this issue and open a new one if necessary.

@patrickkaleta
Copy link
Contributor Author

I just read the initial entry on "Updating business rules for automatically creating GL-step entitites". This is completely outdated now, it would be good to close this issue and open a new one if necessary.

You're probably right, but before we close this issue let me just first remove this outdated rules, actions and variables from the system. Looking at the Business rules overview, it's really starting to get confusing.

@DenoBeno
Copy link

I have removed all the garbage from the rules. This could be in principle closed, but something has been seriously messed up lately. First this:

image

And second, when I try to edit a rule, it causes "out of memory" error. Not always, but quite often. Cleaning the cache helps for a short time.

@DenoBeno
Copy link

DenoBeno commented Oct 7, 2019

why is this still open?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BB: Scenario Management Scenario Management Building Block enhancement New feature or request help wanted Extra attention is needed SHOWSTOPPER Feature or bug, that, if not addressed, renders the CSIS essentially useless
Projects
None yet
Development

No branches or pull requests

4 participants