Issue 103605

Summary: Empty custom properties of type 'Date' or 'Number' are not retained.
Product: General Reporter: stovesy <pete.stoves>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: eric.savary, h.ilter, issues, mst.ooo
Version: OOo 3.1   
Target Milestone: ---   
Hardware: Unknown   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description stovesy 2009-07-17 11:32:25 UTC
If no value is entered at the time of creation, custom document properties of
type 'Date' or 'Number' are not retained.

Myself, I'd like them to be present and empty, so I can easily form fill a
simple document from one place.
Comment 1 eric.savary 2009-07-17 13:34:27 UTC
PB:
- New document (any application)
- File - Properties - Custom Properties
- Add a property of type "Date" or "Number"
- give it a name but don't enter a value
- close the dialog
- reopen the dialog
-> Defined property is gone.
Comment 2 mst.ooo 2009-07-20 15:35:11 UTC
hi stovesy,

i don't understand what you want exactly. do you just want OOo to retain
properties that do not have a valid value in opened documents, or do you want
such properties to be stored in documents?

i don't see much value in the first option; for the second option, please note
that storing e.g. empty date/time/dateTime properties is not possible because
ODF requires these properties to conform to XML Schema datatypes that do not
permit empty strings.
Comment 3 stovesy 2009-07-21 10:43:39 UTC
mst.

I see the problem then. It's not possible to store empty dates and numeric 
values. 
I can't also seem to be able to insert date values from a custom field into the 
document anyway, the contents just don't display.

Also whilst messing around with this, I discover, that once created, one cannot 
change the type of custom property, and re-naming a property actually creates a 
new one. Maybe disable editing of the name & type ui fields after adding ?

For my application, storing dates as text is fine.
Thanks for your time, and also thanks for a great product - I use nothing other 
than ooo.
Comment 4 mst.ooo 2009-07-28 18:24:46 UTC
closing this issue...

@stovesy: 
-inserting custom property "date" fields in writer seems indeed broken, please
file an issue for this
-for renaming properties, there is already issue 94363
-changing the type of a custom property seems to work for me
Comment 5 mst.ooo 2009-07-28 18:25:41 UTC
.
Comment 6 eric.savary 2009-09-23 11:30:57 UTC
Reopening
Comment 7 eric.savary 2009-09-23 11:31:39 UTC
Reassigning
Comment 8 eric.savary 2009-09-23 11:57:56 UTC
@MST: It should be possible to store empty Date.
Use case: when defining the Properties in an empty document which will be saved
*as template*.

Your explanation: "storing e.g. empty date/time/dateTime properties is not
possible because ODF requires..."

I understand your argument but in the end we have an UI which is not consistent:
Text fields can be left empty while dates cannot. This is not intuitive.

Proposals to solve this:

1) Propose a change of the XML schema datatype ;) Ok that may be not possible
but sill remains the question "Why does the XML schema datatype has such a
requirement?"

2) Internally use a dummy date value which will not be shown in the UI

3) Automatically display a dummy date value when choosing this field type.
This will also help the user in writing the date with a correct format.
Apparently the fields differenciates nbetween Text and Date depending of the
format but we have nowhere specified how this format looks like.
Comment 9 Marcus 2017-05-20 10:55:52 UTC
Reset assigne to the default "issues@openoffice.apache.org".