ThemeBoy / SportsPress

An open source league statistics plugin for WordPress created by ThemeBoy.
Other
147 stars 98 forks source link

fast score editing not setting "draw", "win", "loss" - bug? #124

Open miroslawlis opened 9 years ago

miroslawlis commented 9 years ago

When adding scores via wp-admin/edit.php?post_type=sp_event (fast editing). "draw", "win" or "loss" are not set at all, (football aka soccer). Can someone confirm that?

Cheers

MounirHamani commented 9 years ago

Yes I confirm that, In-Line editing doesn't transfer scores to the fields inside the post and when the fields inside the post are used to edit the score, the fields used for In-Line editing are reset to dashes. So when, In-Line editing is used, the standings tables aren't updated.

When you will be fixing this, it would be nice if you added a check to verify that the score fields contained numerical characters (numbers) in order for them to be counted towards the standings. Because there are cases where events are programmed but for various reasons (like whether for example) they don't actually happen, so instead of entering the score, some letters (like N P for Not Played) are entered.

ThemeBoy commented 9 years ago

@miroslawlis @MounirHamani you'll need to configure the outcomes by going to SportsPress > Configure then edit each outcome and choose a condition. For example, the condition for a win should be "Most Goals", etc.

MounirHamani commented 9 years ago

That condition is set, and it works properly when you edit the score at ........./post.php?post=105&action=edit but not when you do it through In-Line editing at ............../edit.php?post_status=publish&post_type=sp_event .

MounirHamani commented 9 years ago

I tested on an other install and it works...

MounirHamani commented 9 years ago

Sorry for triple posting.

I went back near where you suggested, and I reset back the variable goals and then updated the other conditions and it was working again, so the problem came obviously from the variable goals because it didn't translate well. Actually, the variable being invisible to the public and having control over the display title makes it enough for me not to pursue the bug further.

miroslawlis commented 9 years ago

@ThemeBoy got it. Thank You.

miroslawlis commented 9 years ago

but... when You delete scores via fast editing (it will showing "-" again), "Outcome" will not be cleared, and will display last selected option (egz, Drow-drow)