Menu

#341 Table headlines cannot be combined using 'sum()'

v1.1.x
fixed
None
v1.1.1
Bug Fix
2018-11-11
2018-06-04
Erik Hänel
No

One cannot use the sum() function to combine (concatenate) the strings in table headlines.

Rejected:
This issue may not be reproduced.

Reopened:
The issue is reproducable: one has to use it together with another string like sum(targetTable(#, :) + "\n"). This will not work.

Analysis:

The issue is that the strings returned from a table are expanded as a list and not kept as a standard vector. The issue is fixed, if one changes

sData.clear();
for (size_t i = 0; i < strRes.vResult.size(); i++)
    sData += strRes.vResult[i] + ", ";
if (sData.length())
    sData.erase(sData.rfind(','));

to

sData = parser_CreateStringVectorVar(strRes.vResult, mStringVectorVars);

Implementation:

  • Implementation: The changes were done as proposed by the analysis.
  • Revision: [r380]
  • Implementation test: All relevant and possible combinations of table headlines were tested.

Documentation:

  • ChangesLog: updated
  • Comments: The change was commented locally.
  • Documentation articles: Not needed - bug fix
  • Language files: Not needed - bug fix

Tests:

This fix was tested in the automatic SW tests. No deviations detected.

Related

Commit: [r380]

Discussion

  • Erik Hänel

    Erik Hänel - 2018-06-10
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2018-07-01
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,4 @@
     One cannot use the `sum()` function to combine (concatenate) the strings in table headlines.
    +
    +**Rejected:**
    +This issue may not be reproduced.
    
    • status: accepted --> rejected
     
  • Erik Hänel

    Erik Hänel - 2018-08-15
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -2,3 +2,6 @@
    
     **Rejected:**
     This issue may not be reproduced.
    +
    +**Reopened:**
    +The issue is reproducable: one has to use it together with another string like `sum(targetTable(#, :) + "\n")`. This will not work.
    
    • status: rejected --> open
     
  • Erik Hänel

    Erik Hänel - 2018-08-15
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2018-08-21
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -5,3 +5,20 @@
    
     **Reopened:**
     The issue is reproducable: one has to use it together with another string like `sum(targetTable(#, :) + "\n")`. This will not work.
    +
    +###Analysis:
    +(*Describe, what's the issue and which changes have to be made*)
    +
    +###Implementation:
    +* Implementation: (*Describe, what you've changed*) 
    +* Revision: [rXXX]
    +* Implementation test: (*Describe the type of test, which you performed, and if it was succesful*)
    +
    +###Documentation:
    +* ChangesLog: (*Have you updated the changes log?*)
    +* Comments: (*Have you written comments in the code, which describe your change?*)
    +* Documentation articles: (*Have you updated the documentation articles?*)
    +* Language files: (*Have you updated the language files?*)
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2018-08-21
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -7,7 +7,17 @@
     The issue is reproducable: one has to use it together with another string like `sum(targetTable(#, :) + "\n")`. This will not work.
    
     ###Analysis:
    -(*Describe, what's the issue and which changes have to be made*)
    +The issue is that the strings returned from a table are expanded as a list and not kept as a standard vector. The issue is fixed, if one changes
    +
    
    +    sData.clear();
    +    for (size_t i = 0; i < strRes.vResult.size(); i++)
    +        sData += strRes.vResult[i] + ", ";
    +    if (sData.length())
    +        sData.erase(sData.rfind(','));
    +
    +to
    +
    +    sData = parser_CreateStringVectorVar(strRes.vResult, mStringVectorVars);
    
     ###Implementation:
    
     * Implementation: (*Describe, what you've changed*) 
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2018-08-21
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -9,6 +9,7 @@
     ###Analysis:
     The issue is that the strings returned from a table are expanded as a list and not kept as a standard vector. The issue is fixed, if one changes
    
    
    +    :::C++
         sData.clear();
         for (size_t i = 0; i < strRes.vResult.size(); i++)
             sData += strRes.vResult[i] + ", ";
    @@ -20,15 +21,15 @@
         sData = parser_CreateStringVectorVar(strRes.vResult, mStringVectorVars);
    
     ###Implementation:
    -* Implementation: (*Describe, what you've changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was succesful*)
    +* Implementation: The changes were done as proposed by the analysis. 
    +* Revision: [r380]
    +* Implementation test: All relevant and possible combinations of table headlines were tested.
    
     ###Documentation:
    -* ChangesLog: (*Have you updated the changes log?*)
    -* Comments: (*Have you written comments in the code, which describe your change?*)
    -* Documentation articles: (*Have you updated the documentation articles?*)
    -* Language files: (*Have you updated the language files?*)
    +* ChangesLog: updated
    +* Comments: The change was commented locally.
    +* Documentation articles: Not needed - bug fix
    +* Language files: Not needed - bug fix
    
     ###Tests:
     (*Describe, which tests you performed and their outcome*)
    
    • status: implementing --> testing
     

    Related

    Commit: [r380]

  • Erik Hänel

    Erik Hänel - 2018-11-11
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -32,4 +32,4 @@
    
     * Language files: Not needed - bug fix
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +This fix was tested in the automatic SW tests. No deviations detected.
    
    • status: testing --> fixed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB