Clarity

 View Only
  • 1.  CA PPM 14.3 I would like to add the last login date to the resource object

    Posted Aug 23, 2017 10:30 AM

    How can I add a new attribute (last login date) to the resource object.

    This field is stored in the cmn_sec_users table.

    Thanks.



  • 2.  Re: CA PPM 14.3 I would like to add the last login date to the resource object

    Posted Aug 23, 2017 11:15 AM

    Hi Georges,

     

    You can refer to the following Knowledge-base document , to track the login date by resource, from an OOTB perspective.

     

    Where in Clarity can I find the last login date by resource? 

     

    The resource object cannot be enabled for process , which could run a GEL script. You could add an attribute on the resource object, however the resource object cannot be associated in a custom process, which could have further actions on it.

     

    Hope the above helps.

     

    Regards,

    Samik



  • 3.  Re: CA PPM 14.3 I would like to add the last login date to the resource object

    Posted Aug 23, 2017 11:42 AM

    Hi Samik,

    I am aware of the out of the box portlet that can show the last login date (User Count by License Type). However our management  requested to have the last login date at the resource list portlet. I want a way to add this field (last login) to the Resource List portlet.



  • 4.  Re: CA PPM 14.3 I would like to add the last login date to the resource object

    Posted Aug 24, 2017 04:59 AM

    You can not add it to the Resource List screen without creating a new attribute in the object and populating it through some (potentially unsupported) mechanism when the user logs in.

     

    However you could easily build a simple custom portlet with simple NSQL that shows this information though. (It would not be the "Resource List" but an additional screen in the application)



  • 5.  Re: CA PPM 14.3 I would like to add the last login date to the resource object

    Posted Aug 23, 2017 12:11 PM

    Dear Georges,

     

    From OOTB perspective, having a last login date associated at Resource object's list view , will not be feasible. 

    There is an Idea raised presently for the same, refer to the link below:

     

    Resource Administration - Ability to configure / export section / power filters 

     

    Hope this helps.

     

    Regards,

    Samik



  • 6.  Re: CA PPM 14.3 I would like to add the last login date to the resource object

    Posted Aug 24, 2017 09:42 AM

    Just wondering again...

    When a user logs in a sessions is created and a record in the sessions table.

    The session is cleared when user logs out properly or by the cleaning job.

     

    You could create a custom object to store the data from sessions and populate that with a process just before the job runs.with just one record for each user for a day. If that misses too many of the properly closed sessions the process could be run more frequently say hourly during peak hours.

    Then you could have another process to check if there were any new records to the custom object during the past day and if there were you could xog in the date to a custom field of the resource object.in

    Eventually you could display that in the standard resources list  view..supported to me.

     

    Far fetched, but appears supported to me



  • 7.  Re: CA PPM 14.3 I would like to add the last login date to the resource object

    Posted Aug 24, 2017 09:57 AM

    Yeah well you could populate a custom resource attribute from the value on cmn_sec_users via a process and run the process "continually" in order to have up-to-date information on the resource record, but that (and your proposal) I think just are very heavy-handed (and potentially system-hogging) complex things to solve what is a pretty simple requirement... so the temptation for anyone technical building such a thing would be "lets just add a quick database trigger to cmn_sec_users (or cmn_sessions) and forget about all that fiddly process/XOG stuff" which would be the unsupported bit!

    (which is really why I just said "potentially" earlier  )

     

    The "right" answer really is to challenge the stated requirement - i.e. solve the requirement (to see when a resource last logged in) rather than implement a "solutionised"-requirement ("put the login date on the resource list")



  • 8.  Re: CA PPM 14.3 I would like to add the last login date to the resource object

    Broadcom Employee
    Posted Aug 24, 2017 10:42 AM

    Database trigger is not advisable and it will affect system performance. Better to create a on-demand process and update the user last login information in resource object for only mismatched records.

     

    In your query, you need to compare last login information in cmn_sec_users and ODF_CA_RESOURCE table, if both information is not same, then you need to update those records instead of updating last login information for all users.

     

    You can consider only active users in your query block.

     

    Thanks

    Senthil