Menu

#1474 Switching the export format removes filesname part after 1st dot

SQuirreL
closed-fixed
nobody
None
low
2021-08-01
2021-05-14
sfst
No

Tested with snapshot from 2021-05-09, but I think it is a long time behaviour.

Using "Export CSV / MS Excel / XML / JSON ..." and trying to export to the file "d:\2021-05-14 STEP06.17 database PRD mismatching transactions.XLS", but then switching to CSV, everything after the FIRST dot is removed for the extension switch.

Please use the LAST dot.

(It is a minor issue, as the @file capability is very handy to reduce the manual work ;-)

Discussion

  • Gerd Wagner

    Gerd Wagner - 2021-05-14

    Sorry, I can't reproduce your problem. In my tests when I switch file type, the string after the LAST dot of
    d:\2021-05-14 STEP06.17 database PRD mismatching transactions.XLS
    was replaced only.

    Could you give some more details?

     
  • sfst

    sfst - 2021-07-25

    Quite embarrassing mistake. (I only post if I can do the same problem at least twice.)

    Often my prepared statements have a suggested filename in the comment and I paste the filename, adjusting the date only.

    I finally found that I made a typo, having ",xls" instead of ".xls"
    (of course, pasting the typo "worked" each time when testing)

    d:\2021-05-14 STEP06.17 database PRD mismatching transactions,XLS

    So when switching the extension I got the impression the FIRST dot was used.
    Terribly sorry about that.

    Desperately trying to make this a bit useful I would like to question why an "extension" like ".17 database PRD mismatching transactions,XLS" should be removed on switching :-)

    Maybe only the listed extensions CSV, XLSX, XLS, XML, JSON should be removed, if found at the end following a dot?

    Take this as a very weak suggestion, I personally dislike changing long established functionality, if there isn't a compelling reason. Maybe many people like this "clean-up" functionality to remove everything after the LAST dot ;-)

    So, if you think the functionality should stay, please close as NOTABUG.

     
  • Gerd Wagner

    Gerd Wagner - 2021-08-01

    Your suggestion concerning "everything after the LAST dot" is committed to out GIT repository and will be available in future snapshots and versions. Excerpt from change log:

    1474 File export dialog: When export file type was changed any string behind the last "." of the selected export file
    was replaced by the new file type's ending. Now only known file type endings are replaced.
    Examples:

    - When switching to export file type json the file name my.file.name
      used to be changed to my.file.json and is now changed to my.file.name.json
    - When switching to export file type json the file name my.file.csv
      (as before) will we changed to my.file.json
    
     
  • Gerd Wagner

    Gerd Wagner - 2021-08-01
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB