ho-dev / HattrickOrganizer

Assistant for Hattrick online football manager
https://ho-dev.github.io/HattrickOrganizer/
GNU Lesser General Public License v3.0
195 stars 79 forks source link

[BUG]Transfer Tab - wrong season #1172

Closed peppermil closed 3 years ago

peppermil commented 3 years ago

In the transfer overview, the global season is listed. if you select the individual season, the season of the local season is added. There is no possibility to enter the global season

Global season 78 Swiss season 66

I discovered this in version 4.1 as well as in DEF version 5. In the old version HO 3.0 the season is correct.

BUG_Transfer_all season

BUG_Transfer_season 66

wsbrenk commented 3 years ago

@peppermil could you check if seasonoffset is correctly stored in your basic table

in dev version you can start sql editor with debug -> sql-editor copy the command select * from BASICS to the text field and execute the statement by pushing F5 or the correspondig button image

@akasolace in my database i found a hint for our week 16 problems: see the selected line where season offset 1 is calculated (should never happen).

wsbrenk commented 3 years ago

season offset is read from chpp worlddetails file - the mistake (1) is from hattrick!?

peppermil commented 3 years ago

i have 2 entries, but i dont know which one is the right one

Screenshot 2021-09-09 113230 Screenshot 2021-09-09 113319

from the second team, i have -28 in the last line

Screenshot 2021-09-09 113900

akasolace commented 3 years ago

@peppermil could you share your db here ?

wsbrenk commented 3 years ago

SeasonOffset is the problem: if switzerland is 12 seasons behind sweden the value 12 is expected in downloads after end of 2019. Prior downloads should show (null).

akasolace commented 3 years ago

yes, I checked xml from hattrick and it shows correct value:

    <League>
      <LeagueID>46</LeagueID>
      <LeagueName>Switzerland</LeagueName>
      <Season>66</Season>
      <SeasonOffset>-13</SeasonOffset>
wsbrenk commented 3 years ago

@akasolace colors are not optimal for nimbus theme:

image

wsbrenk commented 3 years ago
 <SeasonOffset>-13</SeasonOffset>

@akasolace is this number stored in your basic table. tbh i expected a positive number. i fear, if we are ready to get a non zero offset we could have a sign problem. but i have no chance to debug this with my german teams.

akasolace commented 3 years ago

season offset is read from chpp worlddetails file - the mistake (1) is from hattrick!?

@wsbrenk I was just answering your question, hattirck gives correct info in xml, I dont know why his database is faulty

wsbrenk commented 3 years ago

Not necessarily - the download on 2021-08-21 23:00 was a download of my team and it shows a season offset of (1), which is wrong for my german league. All other downloads are showing the correct value 0. I had the idea that this might be an error on ht side, which might explain our week 16 problem which arrises from time to time.

The values 0 in @peppermil database are definitely another error - i fear on our side, but without a team in foreign countries or his database i can't reproduce it.

Did you see the "white" arrows on white background in the new transfer panel?

peppermil commented 3 years ago

@peppermil could you share your db here ?

@akasolac > if you tell me - where the DB is - yes

wsbrenk commented 3 years ago

@peppermil on windows systems you find them in %APPDATA%/HO. one of the zip-files would be great.

peppermil commented 3 years ago

deleted

wsbrenk commented 3 years ago

thank you

wsbrenk commented 3 years ago

first download on my side stores correct offset value:

image

wsbrenk commented 3 years ago

fixing sign error in HTCalendar.getHTSeason gives this:

image

after reloading all your transfers. Up to now i have no idea, why your downloads gives season offset of 0 and not the correct -13.

wsbrenk commented 3 years ago

@peppermil could you check your hrf-files, if they show the correct season offset:

[basics] application=HO appversion=0.0 date=2021-09-11 00:03:11 season=66 seasonOffset=-13 ...

peppermil commented 3 years ago

yes, it is

[basics] application=HO appversion=4.1 date=2021-09-11 09:44:13 season=66 seasonOffset=-13 matchround=3

wsbrenk commented 3 years ago

very strange - i don't find anything that could explain your wrong values stored in your database. I would now check for errors in your runtime environment. is there anything suspicious in your log files after you downloaded data (%APPDATA%/HO/logs)?

peppermil commented 3 years ago

hi of the first, thank you for your efforts ;)

I also find it also very strange, especially since it worked for you.

Here are my logs https://1drv.ms/u/s!AjKUl1nPppPXjZknL7tVntSPDsaRxQ?e=ErvYgI

wsbrenk commented 3 years ago

got it! Please test again with current 5.0 dev version.

error was repaired in https://github.com/akasolace/HO/commit/e5b46c4743916acfd626d4ca3fb45c726441b7f3#diff-1476fe820e5d82ea5a462531f38a5824c9f5c98f618e37ef2376ad0cba9e40ab Basics(Properties) seasonOffset->seasonoffset

peppermil commented 3 years ago

when i make a update in the DB from 4.1 - was wrong (whit the version HOSetup-5.0.3773.0-DEV-JRE)

Screenshot 2021-09-12 094028

when i startet with a new DB - was 1 player not correct (whit the version HOSetup-5.0.3773.0-DEV-JRE)

Screenshot 2021-09-12 112955

when i take the portable version - was perfekt (whit the version HO-5.0.3774.0-portable-win-DEV-JRE)

Screenshot 2021-09-12 143935

wsbrenk commented 3 years ago

transfers of fired players are now updated in database