UnownHash / Dragonite-Public

8 stars 8 forks source link

Admin: Interface incorrectly showing quest times #10

Closed XerockXMG closed 8 months ago

XerockXMG commented 8 months ago

I noticed that quests didn't run overnight and it seems the root cause is that when looking at the areas list, it was showing a - as the quest hours. However, when opening the area in Edit mode, it was defaulting the quest hours to show [1,10], leaving me to think that the hours were properly set.

Upon looking in the database, I see that it was actually an empty string. Unsure what has caused this. I've never manually edited the database directly in any way.

Edit: After checking another area, I have seen that the area starts with NULL as the quest_mode_hours. If you hit Edit on it and scroll down to the quest mode section, you will see that [1,10] is already in place. Turning on the toggle to activate quests in the area and saving it will update the quest_mode_hours to a empty string. Seems that the [1,10] is a hint and not an actual value.

clburlison commented 8 months ago

Recreation steps

  1. Create a new area in Dragon Admin
  2. Name your area whatever you want
  3. Note the Quest hours is filled in as white text = value. A normal user would expect this to save to the db.
  4. Leave all fields "default" scroll down and click save.

Check database and you'll notice the null value for this area. Recommendation is to switch the [1,10] value that is displayed in the text box from a Value to a Text hint. That should make it obvious to users that they need to fill in this text box. Alterative would be modifying the DB schema with a default value but I disagree with that choice.

TurtIeSocks commented 8 months ago

This indeed would be my fault I suppose. I added [1,10] to be the default value in the client, thinking it would save that upon creating. Weird that it doesn't, but can confirm this was something I changed recently.

jfberry commented 8 months ago

This explains why so many people have been having problems! At least we understand the root cause now - good investigation, thanks guys

Fabio1988 commented 8 months ago

fixed in admin-v1.1.3

Fabio1988 commented 8 months ago

It seems that this still exists on newly created areas only @TurtIeSocks

TurtIeSocks commented 8 months ago

Working as intended here.