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
2464eb18
Commit
2464eb18
authored
Oct 19, 2016
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixed import stuff from Conti
parent
813e6f27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
intranet-csv-import-parser-procs.tcl
tcl/intranet-csv-import-parser-procs.tcl
+30
-3
No files found.
tcl/intranet-csv-import-parser-procs.tcl
View file @
2464eb18
...
...
@@ -32,7 +32,7 @@ ad_proc -public im_csv_import_parser_user_name {
}
{
if
{[
regexp
{
'
}
$arg
match
]}
{
set err
"Found a email (email) with single quote, consider removing single quotes from emails"
im_security_alert -location
"im_csv_import_parser_
project_nr
"
-message
$err
-value
$arg
im_security_alert -location
"im_csv_import_parser_
user_name
"
-message
$err
-value
$arg
return
[
list
$arg
$err
]
}
...
...
@@ -80,7 +80,7 @@ ad_proc -public im_csv_import_parser_company_name {
}
{
if
{[
regexp
{
'
}
$arg
match
]}
{
set err
"Found a company name (
$arg
) with single quote, consider removing single quotes from companies"
im_security_alert -location
"im_csv_import_parser_
project_nr
"
-message
$err
-value
$arg
im_security_alert -location
"im_csv_import_parser_
company_name
"
-message
$err
-value
$arg
return
[
list
$arg
$err
]
}
...
...
@@ -110,7 +110,8 @@ ad_proc -public im_csv_import_parser_project_nr {
set sql
"
select min(p.project_id)
from im_projects p
where p.project_nr = '
$arg
'
where p.parent_id is null and
p.project_nr = '
$arg
'
"
set project_id
[
db_string project_id_from_nr
$sql
-default
""
]
set err
""
...
...
@@ -119,6 +120,32 @@ ad_proc -public im_csv_import_parser_project_nr {
}
ad_proc -public im_csv_import_parser_project_name
{
{
-parser_args
""
}
arg
}
{
Returns a project_id from project_name
}
{
if
{[
regexp
{
'
}
$arg
match
]}
{
set err
"Found a Project Nr with single quote"
im_security_alert -location
"im_csv_import_parser_project_name"
-message
$err
-value
$arg
return
[
list
$arg
$err
]
}
set sql
"
select min(p.project_id)
from im_projects p
where p.parent_id is null and
p.project_name = '
$arg
'
"
set project_id
[
db_string project_id_from_name
$sql
-default
""
]
set err
""
if
{
""
==
$project
_id
}
{
set err
"Didn't find project with project_name='
$arg
'"
}
return
[
list
$project
_id
$err
]
}
ad_proc -public im_csv_import_parser_date
{
{
-parser_args
""
}
arg
...
...
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