Projekt

Allgemein

Profil

Aktionen

Bug #271

offen

Transaction discards all but the first line of the purpose

Von jralls@ceridwen.us vor fast 3 Jahren hinzugefügt. Vor fast 3 Jahren aktualisiert.

Status:
Feedback
Priorität:
Normal
Kategorie:
AqBanking
Beginn:
20.08.2022
Abgabedatum:
Betriebssystem:
Linux, MacOSX, Windows
AqBanking-Version:
6.5.0
Anwendung:
GnuCash
Version der Anwendung:
3.8 and later

Beschreibung

With an MT940 record element
:86:1017?61SAMMELGUTSCHRIFT FÜR KONTO: CH2909000000250094239 VERARBEI
TUNG VOM 17.06.2020 PAKET ID: 9999999999999999

AB_TransactionGetPurposeAsList() returns a GWEN_STRINGLIST of length 1 containing "7?61SAMMELGUTSCHRIFT FÜR KONTO: CH2909000000250094239 VERARBEI". The second line is lost.

I've traced this to AB_Transaction_ReadDb where
/* member "purpose" */
if (p_struct->purpose) {
free(p_struct->purpose); p_struct->purpose=NULL;
p_struct->purpose=NULL;
} { const char *s; s=GWEN_DB_GetCharValue(p_db, "purpose", 0, NULL); if (s) p_struct->purpose=strdup(s); }
sets the value to only the first stored line in the db and
GWEN_STRINGLIST *AB_Transaction_GetPurposeAsStringList(const AB_TRANSACTION *t) {
const char *s;
assert(t);
s=AB_Transaction_GetPurpose(t);

if (s && *s)
{
GWEN_STRINGLIST *stringList;
stringList=GWEN_StringList_fromString(s, "\n", 0);
return stringList;
}
return NULL;
}
Where AB_Transaction_GetPurposeAsStringList tries to split it into multiple lines on newlines. The catch is that Swift940.c's _parseTransactionData already did that and stored the results in the database in multiple strings.

I'm not able to find where AB_Transaction_ReadDb is implemented in transaction.xml

See https://bugs.gnucash.org/show_bug.cgi?id=797565

Aktionen

Auch abrufbar als: Atom PDF