Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-rest
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-rest
Commits
dd269989
Commit
dd269989
authored
Mar 18, 2012
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- REST Interface:
- Added a new hours report - Updated the REST version number
parent
069a83b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
0 deletions
+61
-0
intranet-rest-create.sql
sql/postgresql/intranet-rest-create.sql
+60
-0
intranet-rest-procs.tcl
tcl/intranet-rest-procs.tcl
+1
-0
No files found.
sql/postgresql/intranet-rest-create.sql
View file @
dd269989
...
...
@@ -552,3 +552,63 @@ SELECT acs_permission__grant_permission(
'read'
);
SELECT
im_report_new
(
'REST My Timesheet Projects and Hours'
,
-- report_name
'rest_my_timesheet_projects_hours'
,
-- report_code
'intranet-rest'
,
-- package_key
110
,
-- report_sort_order
(
select
menu_id
from
im_menus
where
label
=
'reporting-rest'
),
-- parent_menu_id
'select child.project_id,
child.parent_id,
tree_level(child.tree_sortkey)-1 as level,
child.project_name,
child.project_nr,
child.company_id,
acs_object__name(child.company_id) as company_name,
child.project_type_id,
child.project_status_id,
im_category_from_id(child.project_type_id) as project_type,
im_category_from_id(child.project_status_id) as project_status,
h.hours,
h.note,
h.material_id,
acs_object__name(h.material_id) as material_name
from
im_projects parent,
im_projects child
LEFT OUTER JOIN (
select *
from im_hours h
where h.user_id = %user_id% and
h.day::date = '
%
date
%
'::date
) h ON (child.project_id = h.project_id),
acs_rels r
where
parent.parent_id is null and
child.project_type_id not in (select * from im_sub_categories(81)) and
child.tree_sortkey between parent.tree_sortkey and tree_right(parent.tree_sortkey) and
r.object_id_one = parent.project_id and
r.object_id_two = %user_id%
order by
child.tree_sortkey
'
);
update
im_reports
set
report_description
=
'
Returns the list of all projects to which the current user
has the right to log hours, together with the list of hours
logged as of the specified %date% URL parameter.'
where
report_code
=
'rest_my_timesheet_projects_hours'
;
SELECT
acs_permission__grant_permission
(
(
select
menu_id
from
im_menus
where
label
=
'rest_my_timesheet_projects_hours'
),
(
select
group_id
from
groups
where
group_name
=
'Employees'
),
'read'
);
tcl/intranet-rest-procs.tcl
View file @
dd269989
...
...
@@ -17,6 +17,7 @@ ad_library {
ad_proc -private im_rest_version
{}
{
Returns the current server version of the REST interface.
Please see www.project-open.org/documentation/rest_version_history
<li>2.1
(
2012-03-18
)
: Added new report and now deprecating single object calls
<li>2.0
(
2011-05-12
)
: Added support for JSOn and Sencha format variants
ToDo: Always return
"id"
instead of
"object_id"
<li>1.5.2
(
2010-12-21
)
: Fixed bug of not applying where_query
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment