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

Import of HabitBull data assumes all habits are daily yes/no and mis-imports numeric value habit scores as No #1265

Closed
2 tasks done
schmerg opened this issue Jan 8, 2022 · 4 comments · Fixed by #1278
Closed
2 tasks done
Assignees
Labels
bug Something is not behaving as the developers expected confirmed The developers have been able to confirm that the issue is valid

Comments

@schmerg
Copy link

schmerg commented Jan 8, 2022

Pre-submission checklist

  • I am submitting a bug report, not a feature request.
  • I have searched for similar issues, but did not find any matches.

Description

HabitBullCSVImporter only recognises the value of 1 in the "values" column of a HabitBull CSV file to be a "YES" and any other value, such as for habits with scores, is considered to be a "NO" (HabitBullCSVImporter.kt line 80). At worst it should score any non-zero value as a YES, and ideally it would change the type of habit from a yes/no into a measurable habit on the first imported row with a value greater than 1

Steps to reproduce

  1. Import a HabitBull CSV file with a habit where the "value" filed (column 5) contains values greater than 1
  2. See that the habit is imported but as a yes/no habit and all days with scores other than 1 have been imported as No.

System information

  • Umidigi F1
  • Phone Operating System: Android 9
  • App version: 2.0.3
@hiqua
Copy link
Collaborator

hiqua commented Jan 8, 2022

Can you attach a sample csv file, so that we can use it in the test?

@schmerg
Copy link
Author

schmerg commented Jan 9, 2022

Sure thing, file attached with 2 habits (one measurable and one yes/no) but also for ease of reading, here's the first few lines

HabitName,HabitDescription,HabitCategory,CalendarDate,Value,CommentText
Pushups,,Fitness,2021-09-01,30,
Pushups,,Fitness,2021-09-02,30,
Pushups,,Fitness,2021-09-03,25,

HabitBull CSV Data File Export.csv

@hiqua hiqua self-assigned this Jan 10, 2022
hiqua added a commit to hiqua/uhabits that referenced this issue Jan 20, 2022
@hiqua hiqua linked a pull request Jan 20, 2022 that will close this issue
hiqua added a commit to hiqua/uhabits that referenced this issue Jan 27, 2022
@hiqua
Copy link
Collaborator

hiqua commented Jan 27, 2022

#1278 should be more or less ready, feel free to have a look / comment.

@hiqua hiqua added bug Something is not behaving as the developers expected confirmed The developers have been able to confirm that the issue is valid labels Jan 27, 2022
@schmerg
Copy link
Author

schmerg commented Jan 28, 2022

I'm not a java dev but it looks like the sort of thing I'd expect to see, and I can see the test case too... will add a further comment once deployed and I can confirm it's working "in the field"
Many thanks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not behaving as the developers expected confirmed The developers have been able to confirm that the issue is valid
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants