Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
search_tips
Project
Project
Details
Activity
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
rank
search_tips
Commits
4dc871d1
Commit
4dc871d1
authored
Jul 03, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
0840e780
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
20 deletions
+5
-20
agile_tag_transfer.py
associate/utils/agile_tag_transfer.py
+5
-20
No files found.
associate/utils/agile_tag_transfer.py
View file @
4dc871d1
...
...
@@ -26,11 +26,7 @@ class TagTransfer(object):
@classmethod
def
get_tag_suggest_data_list
(
cls
,
instance
):
try
:
results
=
agile_tag
.
AgileTagRecommendType
.
objects
.
filter
(
agile_tag_id
=
instance
.
id
,
agile_tag_type
=
AGILE_TAG_RECOMMEND_TYPE
.
TRACTATE
)
.
values_list
(
"agile_tag_type"
,
flat
=
True
)
.
first
()
if
results
:
ret_list
=
list
()
item_dict
=
dict
()
item_dict
[
"id"
]
=
getMd5Digest
(
str
(
instance
.
name
))
...
...
@@ -93,10 +89,7 @@ class TagTransfer(object):
result
=
agile_tag
.
AgileTagType
.
objects
.
filter
(
agile_tag_id
=
instance
.
id
,
agile_tag_type
=
AGILE_TAG_TYPE
.
PROJECT
)
results
=
agile_tag
.
AgileTagRecommendType
.
objects
.
filter
(
agile_tag_id
=
instance
.
id
,
agile_tag_type
=
AGILE_TAG_RECOMMEND_TYPE
.
TRACTATE
)
.
values_list
(
"agile_tag_type"
,
flat
=
True
)
.
first
()
if
result
and
results
:
if
result
:
ret_list
=
list
()
item_dict
=
dict
()
item_dict
[
"id"
]
=
getMd5Digest
(
str
(
instance
.
name
))
...
...
@@ -127,10 +120,8 @@ class TagTransfer(object):
try
:
result
=
agile_tag
.
AgileTagType
.
objects
.
filter
(
agile_tag_id
=
instance
.
id
,
agile_tag_type
=
AGILE_TAG_TYPE
.
POSITION
)
results
=
agile_tag
.
AgileTagRecommendType
.
objects
.
filter
(
agile_tag_id
=
instance
.
id
,
agile_tag_type
=
AGILE_TAG_RECOMMEND_TYPE
.
TRACTATE
)
.
values_list
(
"agile_tag_type"
,
flat
=
True
)
.
first
()
if
result
and
results
:
if
result
:
ret_list
=
list
()
item_dict
=
dict
()
item_dict
[
"id"
]
=
getMd5Digest
(
str
(
instance
.
name
))
...
...
@@ -161,10 +152,7 @@ class TagTransfer(object):
try
:
result
=
agile_tag
.
AgileTagType
.
objects
.
filter
(
agile_tag_id
=
instance
.
id
,
agile_tag_type
=
AGILE_TAG_TYPE
.
INSTRUMENT
)
results
=
agile_tag
.
AgileTagRecommendType
.
objects
.
filter
(
agile_tag_id
=
instance
.
id
,
agile_tag_type
=
AGILE_TAG_RECOMMEND_TYPE
.
TRACTATE
)
.
values_list
(
"agile_tag_type"
,
flat
=
True
)
.
first
()
if
result
and
results
:
if
result
:
ret_list
=
list
()
item_dict
=
dict
()
item_dict
[
"id"
]
=
getMd5Digest
(
str
(
instance
.
name
))
...
...
@@ -195,10 +183,7 @@ class TagTransfer(object):
try
:
result
=
agile_tag
.
AgileTagType
.
objects
.
filter
(
agile_tag_id
=
instance
.
id
,
agile_tag_type
=
AGILE_TAG_TYPE
.
HOSPITAL
)
results
=
agile_tag
.
AgileTagRecommendType
.
objects
.
filter
(
agile_tag_id
=
instance
.
id
,
agile_tag_type
=
AGILE_TAG_RECOMMEND_TYPE
.
TRACTATE
)
.
values_list
(
"agile_tag_type"
,
flat
=
True
)
.
first
()
if
result
and
results
:
if
result
:
ret_list
=
list
()
item_dict
=
dict
()
item_dict
[
"id"
]
=
getMd5Digest
(
str
(
instance
.
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