Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
xiaofang li
MeterSphere
Commits
27e6d479
Commit
27e6d479
authored
3 years ago
by
chenjianxing
Committed by
jianxing
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
refactor: 创建jira缺陷经办人使用name而不是id
parent
fa5a459f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java
+10
-5
...rc/main/java/io/metersphere/track/issue/JiraPlatform.java
with
10 additions
and
5 deletions
+10
-5
backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java
+
10
-
5
View file @
27e6d479
...
...
@@ -229,13 +229,18 @@ public class JiraPlatform extends AbstractIssuePlatform {
jiraClientV2
.
setConfig
(
config
);
customFields
.
forEach
(
item
->
{
if
(
StringUtils
.
isNotBlank
(
item
.
getCustomData
()))
{
String
fieldName
=
item
.
getCustomData
();
if
(
StringUtils
.
isNotBlank
(
fieldName
))
{
if
(
StringUtils
.
isNotBlank
(
item
.
getValue
()))
{
if
(
StringUtils
.
isNotBlank
(
item
.
getType
())
&&
StringUtils
.
equalsAny
(
item
.
getType
(),
"select"
,
"radio"
,
"member"
))
{
JSONObject
param
=
new
JSONObject
();
param
.
put
(
"id"
,
item
.
getValue
());
fields
.
put
(
item
.
getCustomData
(),
param
);
if
(
fieldName
.
equals
(
"assignee"
)
||
fieldName
.
equals
(
"reporter"
))
{
param
.
put
(
"name"
,
item
.
getValue
());
}
else
{
param
.
put
(
"id"
,
item
.
getValue
());
}
fields
.
put
(
fieldName
,
param
);
}
else
if
(
StringUtils
.
isNotBlank
(
item
.
getType
())
&&
StringUtils
.
equalsAny
(
item
.
getType
(),
"multipleSelect"
,
"checkbox"
,
"multipleMember"
))
{
JSONArray
attrs
=
new
JSONArray
();
...
...
@@ -247,9 +252,9 @@ public class JiraPlatform extends AbstractIssuePlatform {
attrs
.
add
(
param
);
});
}
fields
.
put
(
item
.
getCustomData
()
,
attrs
);
fields
.
put
(
fieldName
,
attrs
);
}
else
{
fields
.
put
(
item
.
getCustomData
()
,
item
.
getValue
());
fields
.
put
(
fieldName
,
item
.
getValue
());
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help