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
811cfbbe
Commit
811cfbbe
authored
May 23, 2017
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Improvements from Infax importing
parent
d74e0f0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
intranet-csv-import-procs.tcl
tcl/intranet-csv-import-procs.tcl
+8
-6
No files found.
tcl/intranet-csv-import-procs.tcl
View file @
811cfbbe
...
...
@@ -273,6 +273,8 @@ ad_proc -public im_csv_import_guess_im_timesheet_task { } {} {
{
end_date
"End Date"
date
""
}
{
gantt_project_id
"Gantt Project Id"
number
""
}
{
invoice_id
"Invoice Id"
number
""
}
{
infrax_creation_date
"Creation Date"
date_european
""
}
{
infrax_done_date
"Done Date"
date_european
""
}
{
material_id
"Material"
material
""
}
{
project_name
"Name"
no_change
""
}
{
note
"Note"
no_change
""
}
...
...
@@ -403,8 +405,8 @@ ad_proc -public im_csv_import_parsers {
conf_item_parent_nrs
"Conf Item Parent Nrs"
cost_center
"Cost Center"
date
"Date (generic)"
date_american
"Date US (MM/DD/YYYY)"
date_european
"Date European (DD.MM.YYYY)"
date_american
"Date US (MM/DD/YYYY)"
date_european_dashes
"Date ISO (YYYY-MM-DD)"
hard_coded
"Hard Coded Functionality"
material
"Material"
...
...
@@ -607,12 +609,12 @@ ad_proc -public im_csv_import_guess_map {
# Check for a pretty_name of a DynField
set dynfield_pretty_name_tuples
[
util_memoize
[
list
db_list_of_lists otype_dynfields
"select attribute_name, pretty_name from (
$dynfield
_sql) t"
]]
ns_log Notice
"im_csv_import_guess_map: pretty_names=
$dynfield
_pretty_name_tuples"
foreach
field_
tuple
$dynfield
_pretty_name_tuples
{
set attribute_name
[
lindex
$
field
_
tuple 0
]
set pretty_name
[
lindex
$
field
_
tuple 1
]
ns_log Notice
"im_csv_import_guess_map: pretty_name
_tuple
s=
$dynfield
_pretty_name_tuples"
foreach tuple
$dynfield
_pretty_name_tuples
{
set attribute_name
[
lindex
$tuple
0
]
set pretty_name
[
lindex
$tuple
1
]
if
{
$field
_name_lower eq
[
csv_norm
$pretty
_name
]}
{
ns_log Notice
"im_csv_import_guess_map: found pretty_name match with field_name=
$
pretty
_name ->
$attribute
_name"
ns_log Notice
"im_csv_import_guess_map: found pretty_name match with field_name=
$
field
_name"
return
$attribute
_name
}
}
...
...
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