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

Bad request when creating a recurring transaction #7683

Closed
4 tasks done
dethegeek opened this issue Jun 24, 2023 · 9 comments
Closed
4 tasks done

Bad request when creating a recurring transaction #7683

dethegeek opened this issue Jun 24, 2023 · 9 comments
Labels
bug Verified and replicated bugs and issues. fixed Bugs that are fixed (in a coming release).

Comments

@dethegeek
Copy link

Support guidelines

I've found a bug and checked that ...

Description

Hi

I'm trying to create a recurring transaction. As soon I change the start date of the transaction, I get an alert about inability to load repetition suggestions. The error message is "Could not load repetition suggestions".

Indeed I see that the HTTP request which shall provide the repetition types has very likely a bad payload.

I reproduced on the demo server.

Here is a screenshot of the UI and the developer tools of the browser

image

Debug information

Debug information generated at 2023-06-24 19:19:51 Europe/Amsterdam for Firefly III version 6.0.16.

Scope Version
Firefly III 6.0.16
Firefly III API 2.0.4
DB version 19 (exp. 19)
Docker No
PHP 8.2.7
Host Linux
System info Value
System TZ Europe/Amsterdam
Browser TZ Europe/Paris
App environment local
App debug mode false
App cache driver file
App logging notice, stack
Display errors Off
Error reporting ALL errors
Max upload 2097152 (2 MB)
Interface cli-server
Default language en_US
Default locale equal
BCscale 12
DB drivers mysql
Current driver mysql
Trusted proxies (.env) ``
User info Value
Login provider eloquent
User guard web
Headers N/A, N/A
Stateful domains
Session start 2023-06-01 00:00:00
Session end 2023-06-30 23:59:59
Session first 2020-08-11 12:12:54
User ID 1
User language en_US
User locale en_US
Attempt at "en_US.utf8" 'en_US.utf8'
Attempt at "en_US.UTF-8" 'en_US.UTF-8'
User agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

Expected behaviour

No error alert, and the recurrence types shall be avaiable in the related dropdown

Steps to reproduce

  1. Go to the recuring transactions
  2. Click the "create" button
  3. Change the start date of the recurrent transaction. After typing the 1st character of the date (and any next character) the error pops.

Additional info

No response

@JC5
Copy link
Member

JC5 commented Jun 24, 2023

Nice find, I'll check it out!

@JC5
Copy link
Member

JC5 commented Jun 24, 2023

It works as expected, if you select a date in the future. A fix is in the works to make sure the date select respects this.

@JC5 JC5 added bug Verified and replicated bugs and issues. fixed Bugs that are fixed (in a coming release). labels Jun 24, 2023
JC5 pushed a commit that referenced this issue Jun 24, 2023
@dethegeek
Copy link
Author

I'm doing some tests right now. I just found that the error occurs when the date is invalid. In my case I want to input 2021-02-05 (with french format : dd/mm/YYYY.

When I type the day I begin to type the character 0 for 05. At this moment the day equals to 00 which is obviously invalid.

The same if I try to type 2021. I start by typing 2, and the years changes to 0002.

I found that if I type 5 alone for the day, then I don't have any error.

I think that when the date is invalid, it is useless to send the HTTP request to update the recurrence dropdown; or may be better : to disable it until the begin date has a valid value.

@dethegeek
Copy link
Author

With the fix above, the error does not occurs with an invalid year, but still occurs when I type 0 as 1st digit for the day.

@JC5
Copy link
Member

JC5 commented Jun 25, 2023

True, nice find. This should be fixed now.

JC5 added a commit that referenced this issue Jun 25, 2023
@dethegeek
Copy link
Author

Hi

The fix works.

I wanted to use a recurrent transaction to fill past history of an account. I noticed in the fix that you allowed the user to input past dates (which is what I need). However, when I submit the form, an error pops, telling that only dates in the future are allowed. I'm not sure if you tried to allow past dates to satisfy my need or if it is needed to fix the issue I reported.

@JC5
Copy link
Member

JC5 commented Jun 26, 2023

You have to edit a new recurring transaction and then backdate it. Firefly III will not create past transactions though.

@dethegeek
Copy link
Author

Hi

Ok, then it is useless to try to create old recurrent transactions this way. We can close this issue; thank you.

@github-actions
Copy link
Contributor

Hi there! This is an automatic reply. Share and enjoy

This issue is now 🔒 closed. Please be aware that closed issues are not watched.

  • If the original bug is not actually fixed, please feel free to open a new issue. Please refer to this issue for clarity.
  • Follow-up questions must be posted in a new discussion
  • Further replies to this issue will get no response.

Thank you for your contributions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Verified and replicated bugs and issues. fixed Bugs that are fixed (in a coming release).
Projects
None yet
Development

No branches or pull requests

2 participants