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
c22ef096
Commit
c22ef096
authored
Feb 09, 2012
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- CSV Import:
Dealing with ambigous project_nr vs. project_name
parent
34b8e839
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
import-im_project.tcl
www/import-im_project.tcl
+20
-3
No files found.
www/import-im_project.tcl
View file @
c22ef096
...
...
@@ -321,11 +321,28 @@ foreach csv_line_fields $values_list_of_lists {
select project_id
from im_projects p
where p.parent_id
$parent
_id_sql and
( lower(trim(project_name)) = lower(trim(:project_name))
OR lower(trim(project_nr)) = lower(trim(:project_nr))
)
lower(trim(project_nr)) = lower(trim(:project_nr))
"
-default
""
]
set project_id2
[
db_string project_id
"
select project_id
from im_projects p
where p.parent_id
$parent
_id_sql and
lower(trim(project_name)) = lower(trim(:project_name))
"
-default
""
]
if
{
""
!=
$project
_id &&
""
!=
$project
_id2
}
{
if
{
$ns
_write_p
}
{
ns_write
"<li><font color=red>Error: We have found two different projects, one with
'Project Nr'=
$project
_nr and a second one with 'Project Name'='
$project
_name'.<br>
Please change one of the two projects to avoid this ambiguity.
</font>
\n
"
}
continue
}
if
{
""
==
$project
_id
}
{
set project_id
$project
_id2
}
# Check for problems with project_path
set project_path_exists_p
[
db_string project_path_existis_p
"
select count(*)
...
...
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