Menu

#706 Avoid empty history lines

v1.1.x
closed
gui (58)
v1.1.4
Change Request
2022-08-05
2022-05-16
Erik Hänel
No

If nothing was entered in the terminal during a session, the empty history is kept and will be written to file. Change that to only write new contents to the history file, if the last non-empty line of the history actually contains new contents (and not only the session history date).

Analysis:

Should be an easy change by checking the last non-empty line in void NumeReHistory::saveHistory() and only writing it to file, once it is necessary.

Implementation:

  • Implementation: Implemented as proposed by the analysis.
  • Revision: [r1147]
  • Implementation test: Closed a session with a command entered and closed a session without any command entered. Behavior corresponded to expected behavior.

Documentation:

  • [x] ChangesLog updated
  • [x] Code changes commented
  • Documentation articles:
    • [ ] corresponding documentation articles updated
    • [ ] new documentation articles created
    • [x] not needed
  • Language files:
    • [ ] corresponding language files updated
    • [x] not needed

Tests:

Tested manually. No deviations detected.

Related

Commit: [r1147]

Discussion

  • Erik Hänel

    Erik Hänel - 2022-05-17
    • labels: --> gui
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2022-05-17
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,23 @@
     If nothing was entered in the terminal during a session, the empty history is kept and will be written to file. Change that to only write new contents to the history file, if the last non-empty line of the history actually contains new contents (and not only the session history date).
    +
    +###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 successful*)
    +
    +###Documentation:
    +* [ ] ChangesLog updated
    +* [ ] Code changes commented
    +* **Documentation articles:**
    
    +    * [ ] corresponding documentation articles updated
    +    * [ ] new documentation articles created
    +    * [ ] not needed
    +* **Language files:**
    +    * [ ] corresponding language files updated
    +    * [ ] not needed
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2022-05-17
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,7 +1,7 @@
     If nothing was entered in the terminal during a session, the empty history is kept and will be written to file. Change that to only write new contents to the history file, if the last non-empty line of the history actually contains new contents (and not only the session history date).
    
     ###Analysis:
    -(*Describe, what's the issue and which changes have to be made*)
    +Should be an easy change by checking the last non-empty line in `void NumeReHistory::saveHistory()` and only writing it to file, once it is necessary.
    
     ###Implementation:
    
     * Implementation: (*Describe, what you've changed*) 
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2022-05-17
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,20 +4,20 @@
     Should be an easy change by checking the last non-empty line in `void NumeReHistory::saveHistory()` and only writing it to file, once it is necessary.
    
     ###Implementation:
    -* Implementation: (*Describe, what you've changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +* Implementation: Implemented as proposed by the analysis.
    +* Revision: [r1147]
    +* Implementation test: Closed a session with a command entered and closed a session without any command entered. Behavior corresponded to expected behavior.
    
     ###Documentation:
    -* [ ] ChangesLog updated
    -* [ ] Code changes commented
    +* [x] ChangesLog updated
    +* [x] Code changes commented
    
     * **Documentation articles:**
         * [ ] corresponding documentation articles updated
         * [ ] new documentation articles created
    -    * [ ] not needed
    +    * [x] not needed
     * **Language files:**
         * [ ] corresponding language files updated
    -    * [ ] not needed
    +    * [x] not needed
    
     ###Tests:
     (*Describe, which tests you performed and their outcome*)
    
    • status: implementing --> testing
     

    Related

    Commit: [r1147]

  • Erik Hänel

    Erik Hänel - 2022-08-05
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -20,4 +20,4 @@
    
         * [x] not needed
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +Tested manually. No deviations detected.
    
    • status: testing --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB