Fossil SCM
Treat NULL ticket fields as empty strings when appending new text. Ticket [f6747f854ba62b3]
Commit
0b76ce7b6ba3b641168c14875d3d6f329f389b80
Parent
c774e298c3f213f…
1 file changed
+2
-1
+2
-1
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -218,11 +218,12 @@ | ||
| 218 | 218 | for(i=0; i<p->nField; i++){ |
| 219 | 219 | const char *zName = p->aField[i].zName; |
| 220 | 220 | if( zName[0]=='+' ){ |
| 221 | 221 | zName++; |
| 222 | 222 | if( fieldId(zName)<0 ) continue; |
| 223 | - blob_appendf(&sql,", %s=%s || %Q", zName, zName, p->aField[i].zValue); | |
| 223 | + blob_appendf(&sql,", %s=coalesce(%s,'') || %Q", | |
| 224 | + zName, zName, p->aField[i].zValue); | |
| 224 | 225 | }else{ |
| 225 | 226 | if( fieldId(zName)<0 ) continue; |
| 226 | 227 | blob_appendf(&sql,", %s=%Q", zName, p->aField[i].zValue); |
| 227 | 228 | } |
| 228 | 229 | } |
| 229 | 230 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -218,11 +218,12 @@ | |
| 218 | for(i=0; i<p->nField; i++){ |
| 219 | const char *zName = p->aField[i].zName; |
| 220 | if( zName[0]=='+' ){ |
| 221 | zName++; |
| 222 | if( fieldId(zName)<0 ) continue; |
| 223 | blob_appendf(&sql,", %s=%s || %Q", zName, zName, p->aField[i].zValue); |
| 224 | }else{ |
| 225 | if( fieldId(zName)<0 ) continue; |
| 226 | blob_appendf(&sql,", %s=%Q", zName, p->aField[i].zValue); |
| 227 | } |
| 228 | } |
| 229 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -218,11 +218,12 @@ | |
| 218 | for(i=0; i<p->nField; i++){ |
| 219 | const char *zName = p->aField[i].zName; |
| 220 | if( zName[0]=='+' ){ |
| 221 | zName++; |
| 222 | if( fieldId(zName)<0 ) continue; |
| 223 | blob_appendf(&sql,", %s=coalesce(%s,'') || %Q", |
| 224 | zName, zName, p->aField[i].zValue); |
| 225 | }else{ |
| 226 | if( fieldId(zName)<0 ) continue; |
| 227 | blob_appendf(&sql,", %s=%Q", zName, p->aField[i].zValue); |
| 228 | } |
| 229 | } |
| 230 |