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

Records have time of Template creation if set to success using record editor dialog #232

Closed
hhpmmd opened this issue Oct 30, 2021 · 1 comment · Fixed by #233
Closed

Comments

@hhpmmd
Copy link

hhpmmd commented Oct 30, 2021

Hi,
I am pretty sure this is a bug and not intended behavior:
If you start a program and then click the checkmark-button it sets the record-state to success and updates the time of the record to now. If you click the edit-button (with the pen icon) you get the record editor dialog and if you press success in that dialog it does not update the time for the record but uses the time of the program creation.

To Reproduce
Steps to reproduce the behavior:

  1. Start an old program containing two or more entries
  2. Click on the checkmark for the first one
  3. Click on the pen icon for the second one, then click on success in the dialog
  4. The first entry should have the current time, while the second one should have the time of the program creation

Expected behavior
Both entries should have the current time.

Screenshots
Here the program is created on 1.10.2021, the current date being 30.10.2021.
The red dots are supposed to represent the touches (or just highlight in last screenshot).
SC1
SC2
SC3
SC4
SC5

The screenshots are from running the master branch in the emulator.

Additional context
I looked into the code and found that if you click the checkmark you call a function in RecordArrayAdapter (line 330) which updates the time for the record while when you go the edit-dialog route you go through RecordEditorDialogbox (line 150) which doesn't update the time.

I think there are various ways to fix it. I could submit a PR myself, but I think it's best if someone with more insight into the code base-fixes this. But I could do a PR if you want me to.

@brodeurlv
Copy link
Owner

Hi @hhpmmd,

Thank you for this detailled report. Indeed, it looks like a bug ! Feel free to submit a PR if you like. The fix should have a limited scope and should not impact anything else. Let me know is you have questions.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants