Bug 320070 - Allow changing operation date through "Search & Process"
Summary: Allow changing operation date through "Search & Process"
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: 1.7.1
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Stephane MANKOWSKI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-20 21:37 UTC by Guillaume DE BURE
Modified: 2013-06-09 10:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume DE BURE 2013-05-20 21:37:38 UTC
I have a differed debit card, which means that all operations made using my credit card are withdrawn from my account on a fixed date (the 21st every month). When downloading operations from my bank, all imported credit card operations for a given month have the same date , for example May 21st, with the real purchase date in the comment field.

I would like to use the real purchase date in skrooge, so I would like to correct it using "Search and Process". Could you please add it in the list of fields that can be updated please ?

Thanks :)

Reproducible: Always
Comment 1 Stephane MANKOWSKI 2013-05-21 06:45:50 UTC
What is the format date in the comment?
Comment 2 Stephane MANKOWSKI 2013-05-21 16:59:54 UTC
Hi,

I did the test.
It works if the date format is compliant with sqlite. Means like this: "2013-05-10" (YYYY-MM-DD).
It doesn't work (the date is set empty) is the date format is not like this.

I think this is not acceptable because can cause some "corruptions".
What is your point of view?
What should be the result in case of invalid date?
PS: In the search part, REGEXP can be used to check that the comment content a valid date.
Comment 3 Guillaume DE BURE 2013-05-21 21:10:45 UTC
Date in the comment is in the form DDMMYY. I suppose the update process shall allow to set separately the day, month, and years, but this would make it quite complex to handle... I need to think more about it.
Comment 4 Stephane MANKOWSKI 2013-05-29 11:12:49 UTC
Git commit 52dc142d795c19b64d516c3bc4eeae9bf715600b by Stephane Mankowski.
Committed on 29/05/2013 at 13:12.
Pushed by smankowski into branch 'master'.
Allow changing operation date through "Search & Process"

M  +1    -0    CHANGELOG
M  +1    -1    plugins/skrooge/skrooge_search/skgsearchpluginwidget.cpp
M  +27   -8    skgbankgui/skgpredicatcreator.cpp
M  +10   -2    skgbankmodeler/skgruleobject.cpp
M  +21   -0    skgbasemodeler/skgdocument.cpp
M  +3    -3    skgbasemodeler/skgservices.cpp
M  +-    --    tests/input/search_and_process.skg
M  +3    -0    tests/skgbasemodelertest/skgtestbase.cpp

http://commits.kde.org/skrooge/52dc142d795c19b64d516c3bc4eeae9bf715600b
Comment 5 Guillaume DE BURE 2013-06-08 19:39:25 UTC
I'm not sure I understood how to use the date modifier... A typical comment containing the date looks like this :

"FACTURE CARTE DU 040613 LE PANDA D OR GAILLAC CARTE 49"

You can see this operation was made on June 4th. What shall I set in the update part of the search & process ?
Comment 6 Stephane MANKOWSKI 2013-06-09 10:43:05 UTC
Git commit d7c65376305678f3fd6d1577303690f215d63db9 by Stephane Mankowski.
Committed on 09/06/2013 at 12:42.
Pushed by smankowski into branch 'master'.
Not it works for WORD() too.

M  +24   -8    skgbankgui/skgpredicatcreator.cpp
M  +2    -2    skgbankmodeler/skgruleobject.cpp
M  +-    --    tests/input/search_and_process.skg

http://commits.kde.org/skrooge/d7c65376305678f3fd6d1577303690f215d63db9