OpenEnergyPlatform / oeplatform

Repository for the code of the Open Energy Platform (OEP) website. The OEP provides an interface to the Open Energy Family
http://openenergyplatform.org/
GNU Affero General Public License v3.0
61 stars 19 forks source link

Scenario bundles: Display scenario year "None" even if not selected #1699

Closed han-f closed 1 week ago

han-f commented 3 weeks ago

Description of the issue

Scenario bundles shows scenario year "none", even if no empty scenario year was selected in the drop-down menu. Note: there seems a scenario year 2030 that was deleted and shows up empty in the drop-down menu, while the last entry in the drop-down menu is now 2030 (which I selected instead and then de-selected the "empty" 2030). https://openenergyplatform.org/scenario-bundles/id/28bdde80-ba8a-f6df-7f0f-51451a6cbc80

grafik

Steps to Reproduce

  1. Create scenario bundle
  2. Select scenario years from drop-down, also the missing one (I imagined this would then not show up but become 2030 once fixed)
  3. De-select the empty scenario year.

Ideas of solution

Describe possible ideas for solution and evaluate advantages and disadvantages.

Context and Environment

Workflow checklist

FYI @wingechr @l-emele @stap-m

jh-RLI commented 3 weeks ago

Thank you for documenting this. I just added a comment to this in another topic some time ago. It is better to have this issue

What you are describing relates to a problem with editing / creating new elements in the oekg . Namely, if someone creates an element with an empty name / edits an element and removes the name, that element is shown as ‘none’. Since there is no button to delete elements from the ecosystem, there is nothing the user can do about it.

Then there is another problem related to how these new elements are used. Normally a user creates the scenario year and then others can also use the element. This is good for populating the oekg, but if someone else uses the same scenario year and changes it, that change will be visible everywhere else it is used. (maybe not immediately, but at least when a bundle is updated). To mitigate the problem, we have deactivated the edit function for oekg elements.

Apparently the code cannot handle ‘None’ values and deselecting the option does not help.

Since this is buried deep in the React code, it would take me a lot more time to find the error. Can you have a look at this ?@adelmemariani

han-f commented 3 weeks ago

Thanks @jh-RLI - I also remember we talked about this challenge and I think the idea we had was to make a fixed drop-down list that has all years included (similar as to the drop-down list with countries). Do I recall this correctly? When would you think this could be implemented? And would we need to revisit all our scenario bundles and re-add all the scenario years after such an update?

jh-RLI commented 3 weeks ago

Yes, I also remember that this solution was proposed during our meeting and i also think this will help.

When we can implement this is hard to say due to @adelmemariani situation. Since the React code was written by Adel, it simply costs me too much time to modify the majority of the React code for the scenario bundle (the part that creates the scenario bundle frontend) - I can do it, but would like to avoid it in favour of other tasks. If this situation continues, I will have to revise my development plan. If everything can stay as it is: We are continuously working on all urgent issues - among others, this is still a priority 1 for this month (and possibly until the end of the project). We can prioritise certain issues again if you want. There are currently 18 open ‘Urgency-L’ issues and about 5 of them are close to being solved and will be part of the next release. The next OEP release is in two weeks, I can't guarantee that this issue here will be included then.

Once this is implemented, we will also provide code to migrate the current OEKG entries to the new, updated entries. If we can't do it this way, I will let you know and also tell you what exact steps need to be done.

adelmemariani commented 1 week ago

Thanks, @jh-RLI and @han-f for opening up this discussion. I think the problem will be solved if we have a static list of scenario years, without the possibility to edit the labels. I will do it as soon as I finish my current tasks.

jh-RLI commented 1 week ago

Currently the list starts in year 2000 and ends in 2100. Is that okay?

@han-f @stap-m @l-emele

l-emele commented 1 week ago

I think so.

han-f commented 1 week ago

I agree