Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Respected Contributor.. M_A_A Respected Contributor..
Respected Contributor..
1076 views

Add Custom Validation to Time Management Timesheet Entry Page

Jump to solution

I have a new PPM Time Management Time Sheet Entry Page Requirement that I believe is going to require major customization to the Time Sheet page and its associated processes.

The new requirement is for each Request added to a time sheet, whenever a user adds hours for that Request on their time sheet the page must now validate if the date the hours are for are between the Request's user-defined data fields of Approved For Work Date and Request Completed Date.

This new requirement is to keep resources from entering time against a Request before it has been approved to be worked on and also to prevent hours from being reported to a completed request.

This will be my first time making this major of a change in PPM.  I have no idea where to begin.  I have read the PPM Guides on Customizing the Standard Interface and Web Services.

I have also ran the page's source code through Google Chrome Developer Tool and can see where the validator.js is called from and what form variables are available for use, such as the date and the hours for each time sheet line item.

However, nothing is showing me how to add logic on the Time Sheet Entry Page's "Save" or "Save and Submit" button press to read the Request's 2 user-fields I need to use to qualify the time sheet entries against.

Any examples, explanations, or insight would be greatly appreciated!

0 Likes
1 Solution

Accepted Solutions
Outstanding Contributor.. Amishra Outstanding Contributor..
Outstanding Contributor..

Re: Add Custom Validation to Time Management Timesheet Entry Page

Jump to solution

Cheers mate. Pleasure. 

Now, i understand your point, but apparently there is no easy solution for this situation (not in my experience) it should be a balanced act of process and tools capabilities, we cant just go on to update all the jsp pages and customize everything chances of things breaking during upgrades are higher. 

Anyways. You mentioned people are able to timesheet to a closed request as well, this sounds like an enhancement reuqest to Microfocus and i have personally submitted one of those. 

Also your first part of the comment where you want users to timesheet only when the request is approved. I can think of couple of things:

1) change the process such all requests are considered as proposals and when approved it gets converted into a project and this is where workplan and project settings can drive who can timesheet to the project and will be much restricted. This will obviously mean to incorporate project management module; unsure if all the requests will be classified as projects as welll. 

2) There is a request type TMG Configurable Filters, you can try and add new filters under the Request section to filter your results maybe status and default it so that when the users search the requests they see only the approved ones. Give it a crack and see how you go. 

Also i dont think webservices will be of any help in your scenario, but read the webservices developers guide to find out more. 

Lastly, raise a enhancement with product team and see what they have to say.

Unfortunately i am running out of ideas now... Sorry unable to help a lot here. 

 

Regards,
Ajay Mishra
6 Replies
Outstanding Contributor.. Amishra Outstanding Contributor..
Outstanding Contributor..

Re: Add Custom Validation to Time Management Timesheet Entry Page

Jump to solution

Good Morning,

In my experience i dont think you can have any validation on the submit timesheet page. This is something that you will need to raise with Micro-Focus. 

Now to your issue: There are couple of things that can be explored. 

1. On the request, under the resource tab, there are few options as to who can timesheet when. Please refer attached  snippet. 

2. Also configure the request type to show the actuals and resources that are timesheeting, this will give the manager an idea who is working and timesheeting. It is a nice little grid that shows resource name, actual start, actual finish and hours.(You can configure and create a custom portlet that can give the managers visibility of all the requests and who is timehsheeting and when)

3. The timesheet policy, can control overall work enforcement, but that will be at the total timesheet level, rather than an individual line item.  

4. Have a play around with 'Expected hours setting on the timesheet policy' that will provided what the expected hours are. 

Finally a custom jsp report to suplement the whole process, this will be more of a reactive measure - the managers can run the report and look at it to see who is timesheeting etc... 

Hope this helps. 

Regards,
Ajay Mishra
Respected Contributor.. M_A_A Respected Contributor..
Respected Contributor..

Re: Add Custom Validation to Time Management Timesheet Entry Page

Jump to solution

Ajay, as always thank you for your quick and informative response.  I always appreciate your support here.

Unfortunately I have already implemented all those items - Time Sheet Policy controls, Request's Users and Resources controls, and provided all relevant dashboard portlets to assist project managers in determining who is entering time against what.

But the problem continues as developers continue to enter time against Requests that have yet to go through the approval step or have been closed and should no longer be worked on.  And my executive management team has asked me to provide a logical solution, instead of only the current procedural solution, as you described.

I do understand that it is not a good practice to modify PPM existing web pages.  And i know there is no existing way to add custom user validations to the Time Entry page.   So, I am left with trying to program my new validation requirements into the PPM Time Management Web Pages myself.

I have found the jsp files that control the Time Sheet Entry web page.  I have found where the 'Save' and 'Save and Submit' buttons launch the core validation check processes.  I just now need to find a way, within the context of the web pages source code, of how to query for the 2 user-defined data fields in the requests of the time sheet.

Is there no information from Microfocus that could show me what web services or existing logic I could use within the Time Management source code to fetch fields from a Request in this scenario?

0 Likes
Outstanding Contributor.. Amishra Outstanding Contributor..
Outstanding Contributor..

Re: Add Custom Validation to Time Management Timesheet Entry Page

Jump to solution

Cheers mate. Pleasure. 

Now, i understand your point, but apparently there is no easy solution for this situation (not in my experience) it should be a balanced act of process and tools capabilities, we cant just go on to update all the jsp pages and customize everything chances of things breaking during upgrades are higher. 

Anyways. You mentioned people are able to timesheet to a closed request as well, this sounds like an enhancement reuqest to Microfocus and i have personally submitted one of those. 

Also your first part of the comment where you want users to timesheet only when the request is approved. I can think of couple of things:

1) change the process such all requests are considered as proposals and when approved it gets converted into a project and this is where workplan and project settings can drive who can timesheet to the project and will be much restricted. This will obviously mean to incorporate project management module; unsure if all the requests will be classified as projects as welll. 

2) There is a request type TMG Configurable Filters, you can try and add new filters under the Request section to filter your results maybe status and default it so that when the users search the requests they see only the approved ones. Give it a crack and see how you go. 

Also i dont think webservices will be of any help in your scenario, but read the webservices developers guide to find out more. 

Lastly, raise a enhancement with product team and see what they have to say.

Unfortunately i am running out of ideas now... Sorry unable to help a lot here. 

 

Regards,
Ajay Mishra
Respected Contributor.. M_A_A Respected Contributor..
Respected Contributor..

Re: Add Custom Validation to Time Management Timesheet Entry Page

Jump to solution

Thank you so much.  You have provided me with a couple more options to present to management that I was not aware of.

We have created Enhancement Requests with Microfocus in the past.  But these do not seem to happen fast enough for us, if ever, on most of our requests.

Incorporating Project Management Module is a good idea.  I had looked at that before, but I can now see how it could help for limiting pre-approval time entry.  Thanks for that one!

I had no idea about the TMG Configurable Filters Request Type.  So thanks for that one too!  This is something I could implement immediately to provide some limitation on adding new Requests to Time Sheets prematurely.

I too had been running out of ideas, but you have managed to come through with a few more!  Thanks again for all of your assistance.

0 Likes
ArunKr Super Contributor.
Super Contributor.

Re: Add Custom Validation to Time Management Timesheet Entry Page

Jump to solution

Hello,

Did you get a chance to check the Custom Rules for Time Sheets?

If your management is okay for custom rules, you could go ahead with it. I have done that and I can pretty much say that your case is feasible with custom timesheet rules.

You have to modify  2 properties files - TMCustomRulesResources.properties and config.xml

 

<ppm_home>/server/<server_name>/deploy/itg.war/WEB-INF/conf/TMCustomRulesResources.properties - Specify the Error Messages

<ppm_home>/conf/tm_policy/config.xml - Write the SQL Rules to validate the timesheet

You can write your SQL condition and on satisfying the condition, the custom rule will fire and will populate the error message (given in the properties file) like any other timesheet violation error.

 

Enable to custom rule by adding the following in server.conf

com.kintana.core.server.TM_ENABLE_POLICY_EXTENSION=true

Note: this rule will work only on Submit button and will not work if only Save button is clicked.

You can try this in your Dev and propose and show a demo to your customer.

 

Let me know for any help on this.

 

0 Likes
Respected Contributor.. M_A_A Respected Contributor..
Respected Contributor..

Re: Add Custom Validation to Time Management Timesheet Entry Page

Jump to solution

I had only got as far as reviewing what could potentially be provided to management.  Then, as happens sometimes, after I reviewed the options with management they decided to delay implementation of this feature until such a time when our users could handle this type of limitation on their time sheet entry.

While doing my proof of concept I was having some issues finalizing the functionality with the TMG Configurable Filters.  Your message has shown me the areas I was not aware of to configure for the filters.

I may now go back and finalize my work for this functionality, knowing the areas needing additional changes, to be ready when management once again asks to impose this time sheet control.

All of this information has helped immensely!  Thank you!

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.