RTC Custom attribute With date and time
Kiran Nagara (107●4●18●23)
| asked Mar 14 '13, 7:19 a.m.
edited Mar 14 '13, 7:45 a.m. by Ralph Schoon (63.6k●3●36●47)
Hi,
I want to achieve a custom attribute with both date and time, Is this possible? Right now I see only date (calender) is available but not time (clock), can this be achieved. I have done it programatically to get both date and time on state change, But manually entering date and time in the same field i couldn't find it... Regards, -Kiran |
2 answers
Ralph Schoon (63.6k●3●36●47)
| answered Mar 14 '13, 7:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi, as far as I am aware the time stamp attribute type always stores the date and time. You can use a JavaScript calculated value to get the full date and time information from a timestamp attribute. You can also try to use the string representation to create a time stamp for want and store that in a timestamp attribute.
https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript I have however noticed that the timestamp presentation does not allow to see the time, you could use a calculated string from that. I Just did that yesterday. The issue would be to enter the script in the right format if you wanted to create a timestamp from it. You would probably also add a validator in this case. See the Process Enactment Workshop Lab 5 for more examples. Comments
Kiran Nagara
commented Mar 14 '13, 7:50 a.m.
Hi Ralph,
Ralph Schoon
commented Mar 14 '13, 8:05 a.m.
| edited Mar 14 '13, 8:05 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Kiran, I would agree it would be good to be able choose to enter a date with or without time and having a choice how to present it. One issue is that due dates are a date and then noon.
Sola Otudeko
commented Mar 15 '13, 6:09 a.m.
Hi. What I found is in a custom date field, whatever date you select, RTC hard-codes the time as 12 noon. (Just as well it does not display the time). What we've done is have 2 fields for user to select time (hr and min). The selected date is then recalculated with the user selected time. I've added my name to the rfe.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
Kiran,
Given that presentation doesn't yet allow a user to enter data and time manually, go ahead with your approach of a text string field. In your particular use-case you can seed this field with the a value for date & time (via a script) which should suffice in 50% (or more) of use-cases and for the rest, let the user modify it explicitly.
Thanks,
Pradeep