OpsTimesheetHttpClient

Usage

Possible parameters

Common parameters

  • method(required): either 'archive' or 'report'

Archive parameters

  • archiveDate: the date up to wich all events from all timesheets are archived.

Report parameters

  • transType: the type of output you require. Standard values are 'xhtml' and 'csv'. If not speciefied a raw xml output is generated.
  • person: Show only the timesheet for this person.
  • projectGuid: Show only the timesheet for this project.
  • company: show the timesheet for all this company's projects - only works if projectGuid isn't specified
  • projectName: same as projectGuid, only an additional call to the projectserver is needed to get the right projectGuid for this name.
  • toTimeStamp: Only valid if an fromTimeStamp is specified. Together they mark the period in wich the results must lie.
  • fromTimeStamp: Only valid if an toTimeStamp is specified.
Dates are in the format of yyyyMMdd

Calling the Servlet from a Browser

Getting a report

For example if your server address is http://yourserver.com and you wish to get a report showing all timesheets in csv format. Type in your browsers adress bar the following address and press enter: http://yourserver.com/timesheet/?method=report&transType=csv. You can specify additional parameters as mentioned above. For example if you would like to see only the timesheets for the project with projectGuid: 12345 you would type in the following: http://yourserver.com/timesheet/?method=report&transType=csv&projectGuid=12345.

Archiving timesheets

For example if you wish to archive all timesheets up to 25 august 2005. Type in your browsers adress bar the following address and press enter: http://yourserver.com/timesheet/?method=archive&archiveDate=20050825

Getting a report into Microsoft Excel

You can get the results from the OpsTimeSheetHttpClient directly in excel and OpenOffice.
  • Open a new excel document.
  • Select the cell in wich you wish the table to start(this cell will become the upper-left corner of the table).
  • In the main menubar go to "Data" -> "Get External Data" -> "New Web Query".
  • In the following window enter the url of the OpsTimeSheetHttpClient. It is important to use xhtml as the transType. For Example: http://yourserver.com/timesheet/?method=report&transType=xhtml. You can use additional parameters as described above aslong as the transType remains xhtml. Select "Only the tables" at point two and "None" at point 3 and click OK.
  • In the following window just click OK or if you want tochange the starting cell of the table you can do that here.
  • When asked for a username and password supply your OPS credentials and click OK.

Getting a report in OpenOffice calc

  • Open a new spreadsheet in calc.
  • Select the cell in wich you wish the table to start(this cell will become the upper-left corner of the table).
  • In the main menubar go to "Insert" -> "External Data..".
  • In the following window type the url of the OPS server and press "enter". You need to specify a html page(non-existing) and xhtml as the transType. For example: http://yourserver.com/timesheet/index.html?method=report&transType=xhtml (You can use additional parameters as described above aslong as the transType remains xhtml). After pressing enter you will be asked for a username and password; fill in your ops credentials and click OK.
  • In the textarea below the url there will be 3 choices, pick HTML_tables and click OK.

Troubleshooting

Known Issues

  • Recurring events show up only once in reports.

Extending OpsTimeSheetHttpClient with a new report output format

Extending the httpClient to support another output format is fairly easy. In the WEB-INF\xsl directory there are two files csv.xsl and xhtml.xsl, you can add as may files as you like (the name without the .xsl extension is used in the transType parameter). Just look at the two examples for more information.

-- IvoVanDongen - 14 Oct 2005

Topic revision: r4 - 07 Feb 2006 - 09:34:33 - ZoranKovacevic

tip TWiki Tip of the Day
Disabling individual WikiWords
Prevent a WikiWord from being linked by prefixing it with an exclamation point. Example: To escape SunOs ... Read on Read more

 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback