Bug 139141 - Make Field > Date (variable) the default and rename
Summary: Make Field > Date (variable) the default and rename
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.3.1 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0 target:24.2.0 target:7.6.3
Keywords:
Depends on:
Blocks: Fields-Dialog
  Show dependency treegraph
 
Reported: 2020-12-22 04:51 UTC by DarkTrick
Modified: 2024-05-29 11:55 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the option in question (156.87 KB, image/jpeg)
2020-12-22 04:51 UTC, DarkTrick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DarkTrick 2020-12-22 04:51:03 UTC
Created attachment 168394 [details]
Screenshot of the option in question

Current situation
====================
Under tab "Insert" -> "Field" -> tab "Document" -> Type: "Date"

you can insert:
- fixed date (default)
- automatically updating date


Suggestion
===========
- Remove the fixed date option altogether
OR
- Un-default it (in case it actually has a use case): In list "Select": "Date" should be the selected option by default. 


Reason
=======
Why remove?
I see virtually no use case in this function --> UI evaluation needed.
If a user wants a fixed date, why going through the hassle of inserting a field instead of simply writing it by hand?

Why un-default? 
I'd say the general user wants an automatically updating date, if they are choosing a field. --> Evaluation needed
They might even expect the date field to update automatically and not realize, that it actually doesn't.
Comment 1 Mike Kaganski 2020-12-22 05:46:39 UTC
No idea about ratio of those who need one vs another. But fixed date field is absolutely needed e.g. in templates, where a new document created from the template updates the field at creation, which would be of course impossible with "simply writing it by hand".

The non-fixed variant has other (also limited) use cases, like having a timestamp of print time.

Absolutely no to the "drop"; needUXEval to the "change default".
Comment 2 ibelin123 2021-02-06 03:16:06 UTC
I use this Date (Fixed) in many of my templates. I suggest not to remove this.
Comment 3 S.Zosgornik 2021-02-06 14:07:14 UTC
- no go for removing fixed dates
+ change the default to updated sounds decent
also would rename "Date" to "Auto Date" and "Date (fixed)" to "Current Date"
Comment 4 Heiko Tietze 2021-02-11 14:59:23 UTC
Changing the default makes sense. And probably also the label but to keep modifications small I'd suggest "Date (variable)", which accomplishes the "fixed" term.
Comment 5 Mike Kaganski 2021-02-11 15:07:53 UTC
(In reply to Heiko Tietze from comment #4)
> And probably also the label but to keep modifications small I'd
> suggest "Date (variable)", which accomplishes the "fixed" term.

Just note that original wording from comment 3 is not OK: what "current date" might mean? Today current date is different than was yesterday, so "current date" means to me the opposite to "fixed". I'd even suggest using "current" in the other ("variable") field name: "Date (fixed)" and "Date (current)"?
Comment 6 Heiko Tietze 2022-07-14 07:15:47 UTC
The "fixed" part is added at SwField::GetFieldName() and SwDocInfoField::GetFieldName() not only to Date and Time but also many other strings such as "DocInformation::Created (fixed)" (aka Author). The exception for date/time makes the code hard to read and I wonder now if we really want to do that.

The patch for the order (current date/time first, fixed as second item) has been submitted.
Comment 7 Commit Notification 2022-07-14 08:04:31 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b2c81dad3a0b72d305f1c6967ee4a8069ae11b45

Relates tdf#139141 - Make variable date/time field the default

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Heiko Tietze 2022-09-05 08:15:17 UTC
Seems to be fixed.
Comment 9 Stéphane Guillou (stragu) 2023-01-03 15:24:15 UTC
Heiko, there seems to be an issue with the fix:

1. Open Writer
2. Insert > Field > More fields
3. Insert Date, and further down insert Date (fixed), close dialog
4. Write-click on each one > Edit Fields...

Result:
The highlighted date field is inverted.

Can you also see that? Wasn't the case in 7.4.

Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 10 Heiko Tietze 2023-01-04 08:49:43 UTC
(In reply to Stéphane Guillou (stragu) from comment #9)
> Can you also see that? Wasn't the case in 7.4.

Confirming the issue, the items are twisted.
Comment 11 Commit Notification 2023-01-06 07:27:41 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d7514d34b67626ba0b7d1dc0e9acbdfc635fe0ac

Revert "Relates tdf#139141 - Make variable date/time field the default"

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2023-01-06 12:14:19 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/1a7db8daf9da33133c49e803cb1b834d9351bf59

Revert "Relates tdf#139141 - Make variable date/time field the default"

It will be available in 7.5.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Heiko Tietze 2023-01-06 12:17:20 UTC
Reverted the patch now.
Comment 14 Commit Notification 2023-01-08 09:14:10 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e37f06f534ac864f9fe8cd20b07a85c36e697d41

Resolves tdf#139141 - Make variable date/time field the default

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Stéphane Guillou (stragu) 2023-01-09 09:27:57 UTC
Verified as fixed in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8ae84bb5566e12df64236a116b9d1889d6f5f052
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Thanks Heiko! Do you have follow-ups or are you OK to mark as "Resolved - Fixed"?
Comment 16 Heiko Tietze 2023-01-09 09:34:40 UTC
If we decide to cherry-pick this for 7.5... but fixed anyway.
Comment 17 maymarilyn 2023-03-18 18:39:18 UTC Comment hidden (spam)
Comment 18 Mike Kaganski 2023-09-09 18:04:15 UTC
No mention in release notes? See https://ask.libreoffice.org/t/need-shortcut-key-to-insert-time-fixed-into-a-journal-document/95622
Comment 19 bugzilla 2023-09-18 16:06:01 UTC
This is a disastrous change I've just discovered in LO v7.6.

It prevents creating a simple Keyboard shortcut to get Date (fixed) or Time (fixed) which I use frequently in journal documents.
Comment 20 Mike Kaganski 2023-09-19 02:10:42 UTC
So - the fix seems to go beyond the proposed "let's change the default *under tab "Insert" -> "Field" -> tab "Document" -> Type: "Date"*" (see comment 0), and also changes the related UNO command (-> an API change) - is that intentional, Heiko?
Comment 21 Heiko Tietze 2023-09-19 08:51:16 UTC
Skimming through the patches and reversions I remember some trouble with the patch. The (reasonable) request was to change the default in the dialog; and it is not ideal that the UNO command just picks the first item (or the one which is selected by default).
Comment 22 Mike Kaganski 2023-09-19 08:59:57 UTC
(In reply to bugzilla from comment #19)

Please report a new bug. It would be a regression by this one, and it's fix would need fixing how the UNO command works. Thank you.
Comment 23 bugzilla 2023-09-20 12:54:58 UTC
New Bug report Bug 157337 duly created.
Comment 24 Heiko Tietze 2023-10-23 13:43:12 UTC
Reverted, needs an extra UNO command
Comment 25 Commit Notification 2023-10-23 13:43:17 UTC Comment hidden (noise)
Comment 26 Commit Notification 2023-10-24 07:18:12 UTC Comment hidden (noise)
Comment 27 Commit Notification 2023-10-25 10:26:16 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6c073a180b6af61963fcce0da63ba66b97357ccb

tdf#139141: Add UNO commands for variable date/time fields

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 28 bugzilla 2024-01-24 15:15:02 UTC
Phew, sanity restored. LO 7.6.3 onward are confirmed as fixed i.e. Ctrl+; gives Data Fixed (both Writer and Calc).

Many thanks.
Comment 29 Stéphane Guillou (stragu) 2024-05-21 01:28:41 UTC
We now have (since 24.2):
- separate UNO commands for Fixed and Variable variants, which can be assigned a shortcut in the Customize dialog
- We have both variants by default in the Insert menu
- Labels of the two commands now make the distinction clear

Comments here have proven that users rely on the fixed variant. Also, some workflow might be broken by changing the default. We can't change the behaviour of .uno:InsertDateField because it would break existing macros.

My suggestion is to close either as "won't fix", or "fixed" by the addition of the new commands for easy keybinding / toolbar customisation.

Anyone against?
Comment 30 Heiko Tietze 2024-05-21 06:22:45 UTC
(In reply to Stéphane Guillou (stragu) from comment #29)
> "won't fix", or "fixed"
Darktrick, what do you think?