Bug 157420 - Allow setting a default Date and Time format for fields (see comment 12)
Summary: Allow setting a default Date and Time format for fields (see comment 12)
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.1.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 157337
Blocks: Fields
  Show dependency treegraph
 
Reported: 2023-09-24 21:15 UTC by FaithfulScuff
Modified: 2024-04-05 13:27 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
see comment (17.06 MB, video/quicktime)
2023-10-10 02:48 UTC, FaithfulScuff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description FaithfulScuff 2023-09-24 21:15:46 UTC
When setting the keyboard shortcut for Date and Time, it would be nice if the choices could be moved to the top of the column, and that would be the format used during the use of the shortcut. 

For the date, date and date fixed, it would be nice to be able to move date fixed to the top so fixed is used.

For example, in date, date fixed, NNNNMMMM D, YYYY could be moved to the top and that would be the format used.

Same for the time keyboard shortcut.
Comment 1 Stéphane Guillou (stragu) 2023-10-09 19:37:21 UTC
Thanks for the suggestion.
Can you please provide more details, include which dialog(s) you use, and explain what column you are talking about?
I was looking at the Tools > Customize > Keyboard tab but couldn't match it to your description.
Comment 2 FaithfulScuff 2023-10-10 02:48:49 UTC
Created attachment 190101 [details]
see comment

Hello,
I made a video, my explanations can be confusing.
https://youtu.be/Vm-COZCG9wY
thank you
Comment 3 QA Administrators 2023-10-10 03:15:03 UTC Comment hidden (obsolete)
Comment 4 Stéphane Guillou (stragu) 2023-10-10 08:07:59 UTC
Thanks for the video, that makes more sense.

So the request is:

"Let the user define a default subtype and format for the Insert Time or Insert Date command, so it is inserted when using the corresponding shortcuts."

Note that, as far as I can tell, the format is tied to the paragraph language: if I insert a date in an English (Australia) paragraph, it will be 31/12/23, whereas it will be 12/31/23 in an English (USA) paragraph. But why not allowing the user to override that with a setting somewhere (unsure where that would live: in the Fields dialog or in Options > Language?).

Regarding the "subtype" (e.g. fixed vs not fixed), there is a discussion on how they could be separated as distinct UNO commands, following the change of default in 7.6: bug 157337. In my opinion, this ticket can't be resolved until we have a resolution for bug 157337.

Copying the UX/Design team in for opinion.
Comment 5 FaithfulScuff 2023-10-10 17:36:50 UTC
Yes, we are now on the same page. Thank you for watching the video and your time.
Comment 6 FaithfulScuff 2023-10-10 18:31:24 UTC
I do believe the request made here would also apply to fixing the Bug 157337, as they are also asking about inserted time and date via keyboard shortcuts.

Sorry, I don't see how to add a hyperlink to this message.
Comment 7 Heiko Tietze 2023-10-16 15:39:28 UTC
I fully agree with this proposal as solution for bug 157337. Another idea idea could be to just remember the last choice, and not move the item up/down. IIRC it was not so simple to code.

I wonder if we need another ticket for this. Resolving bug 157337 also solves this issue and vice versa. Up for QA...
Comment 8 Stéphane Guillou (stragu) 2023-10-17 09:06:19 UTC
Setting this enhancement to "new", now that bug 157337 is focused on the UNO command regression.
Comment 9 Mike Kaganski 2023-10-17 09:07:25 UTC
While it would be reasonable to introduce new UNO commands specifically to allow insertion of *non-fixed* date/time, it would be not reasonable to go further, and introduce unlimited flexibility to the UNO commands, when there already is an API to do the task.

See e.g. macros discussed at https://ask.libreoffice.org/t/how-to-create-a-macro-to-insert-the-current-date-in-the-current-language/28707.
Comment 10 Philippe Cloutier 2024-03-29 22:02:16 UTC
I am afraid I don't understand the problem FaithfulScuff. In version 24.2.1.2, Insert → Date (fixed) and Insert → Date (variable) are different functions, which can have their own shortcuts. Are you saying that was not the case in 7.6.1.2?
Comment 11 FaithfulScuff 2024-03-29 22:13:23 UTC
Philippe Cloutier did you see the link to the video in comment #2?
Comment 12 Stéphane Guillou (stragu) 2024-04-02 03:23:05 UTC
With the fix for bug 157337, the situation has changed, which is why Philippe is asking.
It is now possible to assign a shortcut to any of the subtypes of Date and Time fields (fixed or non-fixed) - that part is fixed.

So this ticket has changed scope and is now only about the default _format_ of such fields - I am changing the summary, and copying the UX/Design team in again as the new focus does not have clear support - see Mike's comment 9.

(FaithfulScuff, please test with the latest 24.2 version from now on.)
Comment 13 FaithfulScuff 2024-04-03 19:45:03 UTC
I have the latest version. I may not have selected the correct version when reporting the situation.

I looked comment #9, and I am not sure what API he is referring to.
Comment 14 Stéphane Guillou (stragu) 2024-04-04 01:55:05 UTC
(let's stick to the earliest version affected; it is consistent with when you reported the issue)
Can you please confirm that the remaining issue is that you'd like to be able to define a default format for inserted date and time fields?
Comment 15 FaithfulScuff 2024-04-04 02:07:27 UTC
(In reply to Stéphane Guillou (stragu) from comment #14)
> (let's stick to the earliest version affected; it is consistent with when
> you reported the issue)
> Can you please confirm that the remaining issue is that you'd like to be
> able to define a default format for inserted date and time fields?

Yes, I can confirm that being able to define a default format for date and time would be wonderful.

Thank you for the consideration.
Comment 16 QA Administrators 2024-04-04 03:15:46 UTC Comment hidden (obsolete)
Comment 17 Mike Kaganski 2024-04-04 03:52:19 UTC
I believe, that instead of such a specific setting, a way to define /program-wide/ default date/time format would be anough and much better, i.e. fixing Bug 46448 would fix this as well. But implementing this separately would introduce a fragmentation (this part of program uses this, that part of the program uses that), and so is not good.
Comment 18 Heiko Tietze 2024-04-04 08:27:46 UTC
The UNO command for variable date/time in Writer was added for bug 139141. This bug introduced (and reverted) the regression in bug 157337 - macros rely on the first item, for some reason.

I see no need to change the default since you can insert both fix and variable per UNO commands (and customize these to your liking).

(In reply to FaithfulScuff from comment #15)
> ...being able to define a default format for date and time would be wonderful.
Why?
Comment 19 FaithfulScuff 2024-04-04 16:45:03 UTC
(In reply to Heiko Tietze from comment #18)
> The UNO command for variable date/time in Writer was added for bug 139141.
> This bug introduced (and reverted) the regression in bug 157337 - macros
> rely on the first item, for some reason.
> 
> I see no need to change the default since you can insert both fix and
> variable per UNO commands (and customize these to your liking).
> 
> (In reply to FaithfulScuff from comment #15)
> > ...being able to define a default format for date and time would be wonderful.
> Why?

I use Writer to journal, when adding the date it defaults to MM/DD/YY. I use Wednesday, April 3, 2024 which has to be changed every time I use the shortcut "command D". IF there is a way to set the default date format for all of writer I would change that if I had the proper code like mm/dd/yy to get the output I am looking for.
Thank you.
Comment 20 Heiko Tietze 2024-04-05 13:27:42 UTC
(In reply to FaithfulScuff from comment #19)
> I use Writer to journal, when adding the date it defaults to MM/DD/YY. I use
> Wednesday, April 3, 2024 which has to be changed every time I use the
> shortcut "command D".
The format follows the locale, meaning if you switch between English and German you get either MM/DD/YY or DD/MM/YY. But I don't know a locale that uses your format - could be one approach to introduce a new locale somehow (unlikely that works).

Another idea I had was table styles, that also apply a number format. No success either here.

And last but not least you could insert a date via macro and apply the correct formatting on-the-fly. 

Adding some experts in CC for more ideas. But ultimately changing the default format is not an option. => WF