Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-csv-import
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-csv-import
Commits
147e5325
Commit
147e5325
authored
Nov 30, 2015
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-- new import: im_hours
parent
79b6b8db
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
389 additions
and
5 deletions
+389
-5
intranet-csv-import-procs.tcl
tcl/intranet-csv-import-procs.tcl
+7
-2
import-2.adp
www/import-2.adp
+17
-3
import-2.tcl
www/import-2.tcl
+4
-0
import-im_hours.tcl
www/import-im_hours.tcl
+360
-0
index.adp
www/index.adp
+1
-0
No files found.
tcl/intranet-csv-import-procs.tcl
View file @
147e5325
...
...
@@ -262,6 +262,12 @@ ad_proc -public im_csv_import_object_fields {
}
{
Returns a list of database columns for the specified object type.
}
{
# Special case: im_hour is not an object
if
{
"im_hour"
==
$object
_type
}
{
return
"project_id user_id day hours"
}
# Get the list of super-types for object_type, including object_type
# and remove
"acs_object"
from the list
set super_types
[
im_object_super_types -object_type
$object
_type
]
...
...
@@ -316,7 +322,6 @@ ad_proc -public im_csv_import_object_fields {
lappend selected_tables
$table
_name
incr cnt
}
return
[
lsort
$selected
_columns
]
}
...
...
@@ -331,7 +336,7 @@ ad_proc -public im_csv_import_parsers {
Returns the list of available parsers
}
{
switch
$object
_type
{
im_project - im_company - im_conf_item - im_risk - im_timesheet_task - im_ticket
{
im_project - im_company - im_conf_item - im_risk - im_timesheet_task - im_ticket
- im_hour
{
set parsers
{
no_change
"No Change"
hard_coded
"Hard Coded Functionality"
...
...
www/import-2.adp
View file @
147e5325
...
...
@@ -7,13 +7,13 @@
$(document).ready(function() {
// Initialize
$('#@form_id@').sayt({'days': 180});
$('#@form_id
;literal
@').sayt({'days': 180});
// if($('#@form_id@').sayt({'checksaveexists': true}) == true)
// if($('#@form_id
;literal
@').sayt({'checksaveexists': true}) == true)
// { console.log('Form has an existing save cookie.'); } else { console.log('No cookie found'); };
// Do not save the hidden fields
$('#@form_id@').sayt({'exclude':
$('#@form_id
;literal
@').sayt({'exclude':
[
'[name=return_url]',
'[name=object_type]',
...
...
@@ -33,6 +33,20 @@ $(document).ready(function() {
<form enctype="multipart/form-data" method=POST action="import-@redirect_object_type@.tcl" id="@form_id@">
<%= [export_vars -form {object_type return_url import_filename}] %>
<if @object_type;literal@ eq im_hour>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><input type="checkbox" name="merge_p" /></td>
<td>If checked, import hours will be added to already existing hours found on target server.</td>
</tr>
<tr>
<td><input type="checkbox" name="test_run_p" checked></td>
<td>Uncheck to perform a real run</td>
</tr>
</table>
</if>
<table>
<tr clas=rowtitle>
<td class=rowtitle>Field Name</td>
...
...
www/import-2.tcl
View file @
147e5325
...
...
@@ -75,6 +75,10 @@ if {"" == $return_url} {
set return_url
"/intranet/users/index"
set form_id
"intranet-csv-import-import2-users"
}
im_hour
{
set return_url
"/intranet/index"
set form_id
"intranet-csv-import-import2-hours"
}
default
{
set return_url
"/intranet"
set form_id
"intranet-csv-import-import2-other"
...
...
www/import-im_hours.tcl
0 → 100755
View file @
147e5325
This diff is collapsed.
Click to expand it.
www/index.adp
View file @
147e5325
...
...
@@ -15,6 +15,7 @@
im_company
"
Company
"
\
im_conf_item
"
Configuration
Item
(
no
mapping
,
requires
correct
CSV
header
names
)"
\
im_project
"
Project
"
\
im_hour
"
Hour
"
\
im_risk
"
Risk
"
\
im_timesheet_task
"
Timesheet
Task
"
\
person
"
User
"
\
...
...
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