It's all about the answers!

Ask a question

RTC Custom attribute With date and time


Kiran Nagara (10741723) | asked Mar 14 '13, 7:19 a.m.
edited Mar 14 '13, 7:45 a.m. by Ralph Schoon (61.1k33643)
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

Comments
Pradeep Balachandran commented Mar 14 '13, 2:50 p.m.
JAZZ DEVELOPER

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

2 answers



permanent link
Ralph Schoon (61.1k33643) | 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,

Wouldn't this be a good feature to have in RTC... Do you know if there is an enhancement request WI...

I'm looking to create a custom field for an event which has already occurred and want to fill in both the event date and time when it occurred (the event is past event).

Regards,
-Kiran


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.

I just looked into the work items (you could do that too!) and others agree too. The work item is really pretty old and there is a newer RFE too. See https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=50718 and add your support.


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.
regards
Sola


permanent link
Sola Otudeko (4511316) | answered Mar 14 '13, 7:34 a.m.
I don't believe there is. I need same functionality. I ended up creating my own time fields (just string value drop downs for hrs and mins)...then adjust selected date to this time in my extension.
Regards
Sola

Comments
Kiran Nagara commented Mar 14 '13, 7:39 a.m. | edited Mar 14 '13, 7:39 a.m.

Have you come across an enhancement request for this functionality on Jazz.net?

Your answer


Register or to post your answer.