View Issue Details

IDProjectCategoryView StatusLast Update
0008481mantisbtcustom fieldspublic2019-08-08 16:13
Reporterpluntke Assigned Toatrol  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status resolvedResolutionduplicate 
Product Version1.1.0rc1 
Target VersionFixed in Version 
Summary0008481: default value for date type fields (variable)
Description

found the request (but no answer) in the forum and I'm interested in it too:

default value for custom fields of type "date" like "today()" or "today()+3"

TagsNo tags attached.

Relationships

duplicate of 0007634 closedvboctor Support relative default for Date Custom Fields (e.g. {tomorrow}, {+2 days}, {next week}) 

Activities

vboctor

vboctor

2007-10-19 01:47

manager   ~0015894

Sounds like a good idea. However, we need to specify a format that is easy for users to remember and easy to parse as well. The format should be parsed and processed, we should not eval() (i.e. execute a string as PHP). I am not saying you are referring to that, but I think it is useful to make it part of the feature requirements.

If we need to always add a date offset, then the default can be 0 for today, 7 for a week from today and -7 for last week.

Any thoughts relating to the format?

pluntke

pluntke

2007-10-19 02:17

reporter   ~0015897

Just some more thoughts on it:

Will this be possible within the config-file or on the custom_fields' webpage?
It could be any format but should be documented there. (I'm missing some help bubbles at many places at the moment by the way)

thinking of values which are used in some software as shortcuts for quick date entries like

t for Today
m for first day in Month
h for last day in montH
y for first day in Year
r for lasxt day of yeaR
which means simply using the first letter of the word for the start of the period or for stepping one period back and using last letter for end of period or stepping one period further.

Don't know if this is localizable to all countries?

maybe you could "count" with these letters too:
mm for first day of last month
mmm for first day of last but one month

absolute numbers could be added
m+3 for 3rd of last month

You also could think of these letters to be used not only for setting a default for the date fields but also to be usable by reporters:

At the moment the partitioning of date entry into three fields is little inconvenient (depends on what you are used to) - many other software is more tolerant to date entries (into one single field)
Depending on the preset date format (concerning the order of day and month and year) many software also accepts
entries like
12-7-7 or
12/7/7 or
12 7 7 or
12.7.7 or even
12.7.
to get to the same date: 7th of december actual year

Even for accepting letter-coded entries as above a single field entry would be probably easier to come along with from the programmer's view AND from the user's (knowing where to enter the letter when there are not three fields).

pluntke

pluntke

2007-10-19 02:27

reporter   ~0015899

PS: you could also use these letters for first of next month which would be:

"hhm"
123

1) step to last of actual month
2) step to last of next month
3) step back to first of next month

or "rmm"
for the next 1st of november after today

combining letters shows the strength of the system

deboutv

deboutv

2007-10-19 02:50

reporter   ~0015901

Last edited: 2007-10-19 02:50

I have implemented yesterday, today and tomorrow default values ( http://deboutv.free.fr/mantis/plugin.php?plugin=LongCF )

I'm not sure that "tmhyr" idea is readable but I have nothing else to propose.

vboctor

vboctor

2007-10-19 03:46

manager   ~0015905

Just thought this would be interesting as well:
http://us.php.net/strtotime

poooool

poooool

2009-10-14 08:42

reporter   ~0023182

duplicate to 7643

Issue History

Date Modified Username Field Change
2007-10-18 15:43 pluntke New Issue
2007-10-19 01:47 vboctor Note Added: 0015894
2007-10-19 01:47 vboctor Status new => acknowledged
2007-10-19 02:17 pluntke Note Added: 0015897
2007-10-19 02:27 pluntke Note Added: 0015899
2007-10-19 02:50 deboutv Note Added: 0015901
2007-10-19 02:50 deboutv Note Edited: 0015901
2007-10-19 03:46 vboctor Note Added: 0015905
2009-10-14 08:42 poooool Note Added: 0023182
2019-08-08 16:13 atrol Assigned To => atrol
2019-08-08 16:13 atrol Status acknowledged => resolved
2019-08-08 16:13 atrol Resolution open => duplicate
2019-08-08 16:13 atrol Relationship added duplicate of 0007634