You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/07/06 05:13:07 UTC
[camel] branch main updated: Fix camel-jira to add assignee using the id (#10602)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new c20af246d3e Fix camel-jira to add assignee using the id (#10602)
c20af246d3e is described below
commit c20af246d3e58f04d14b9fc3e5a69a68c2275437
Author: Claudio Miranda <cl...@claudius.com.br>
AuthorDate: Thu Jul 6 02:13:01 2023 -0300
Fix camel-jira to add assignee using the id (#10602)
- Jira cloud service requires the user id instead of the user name for the assignee
field
- Adds more context about the authentication using personal token
---
.../org/apache/camel/catalog/components/jira.json | 37 +++++++++++-----------
.../apache/camel/catalog/schemas/camel-spring.xsd | 2 +-
.../org/apache/camel/component/jira/jira.json | 37 +++++++++++-----------
.../camel-jira/src/main/docs/jira-component.adoc | 21 +++++++-----
.../apache/camel/component/jira/JiraConstants.java | 2 ++
.../component/jira/producer/AddIssueProducer.java | 7 ++++
.../jira/producer/UpdateIssueProducer.java | 8 +++++
7 files changed, 69 insertions(+), 45 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jira.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jira.json
index 3b6b82ce7f0..f80cdf2e82b 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jira.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jira.json
@@ -36,24 +36,25 @@
"verificationCode": { "index": 11, "kind": "property", "displayName": "Verification Code", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.jira.JiraConfiguration", "configurationField": "configuration", "description": "(OAuth only) The verification code from Jira generated in the first step of the authorization proccess." }
},
"headers": {
- "IssueAssignee": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The assignee's name of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_ASSIGNEE" },
- "IssueComponents": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The comma separated list of the issue's components", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_COMPONENTS" },
- "IssueChanged": { "index": 2, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the updated field (i.e Status)", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_CHANGED" },
- "IssueKey": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_KEY" },
- "IssuePriorityId": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The priority's id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_PRIORITY_ID" },
- "IssuePriorityName": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The priority's name of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_PRIORITY_NAME" },
- "ProjectKey": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The project's id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_PROJECT_KEY" },
- "IssueSummary": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The summary of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_SUMMARY" },
- "IssueTransitionId": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The transition id", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_TRANSITION_ID" },
- "IssueTypeId": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type's id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_TYPE_ID" },
- "IssueTypeName": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type's name of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_TYPE_NAME" },
- "IssueWatchedIssues": { "index": 11, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of all issue keys that are watched in the time of update", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_WATCHED_ISSUES" },
- "IssueWatchersAdd": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The comma separated list of watchers to add to the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_WATCHERS_ADD" },
- "IssueWatchersRemove": { "index": 13, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The watchers of the issue to remove", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_WATCHERS_REMOVE" },
- "ParentIssueKey": { "index": 14, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the parent issue", "constantName": "org.apache.camel.component.jira.JiraConstants#PARENT_ISSUE_KEY" },
- "ChildIssueKey": { "index": 15, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the child issue", "constantName": "org.apache.camel.component.jira.JiraConstants#CHILD_ISSUE_KEY" },
- "linkType": { "index": 16, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type of link", "constantName": "org.apache.camel.component.jira.JiraConstants#LINK_TYPE" },
- "minutesSpent": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "-1", "description": "The minutes spent", "constantName": "org.apache.camel.component.jira.JiraConstants#MINUTES_SPENT" }
+ "IssueAssigneeId": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The assignee's id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_ASSIGNEE_ID" },
+ "IssueAssignee": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The assignee's name of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_ASSIGNEE" },
+ "IssueComponents": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The comma separated list of the issue's components", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_COMPONENTS" },
+ "IssueChanged": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the updated field (i.e Status)", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_CHANGED" },
+ "IssueKey": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_KEY" },
+ "IssuePriorityId": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The priority's id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_PRIORITY_ID" },
+ "IssuePriorityName": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The priority's name of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_PRIORITY_NAME" },
+ "ProjectKey": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The project's id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_PROJECT_KEY" },
+ "IssueSummary": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The summary of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_SUMMARY" },
+ "IssueTransitionId": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The transition id", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_TRANSITION_ID" },
+ "IssueTypeId": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type's id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_TYPE_ID" },
+ "IssueTypeName": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type's name of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_TYPE_NAME" },
+ "IssueWatchedIssues": { "index": 12, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of all issue keys that are watched in the time of update", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_WATCHED_ISSUES" },
+ "IssueWatchersAdd": { "index": 13, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The comma separated list of watchers to add to the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_WATCHERS_ADD" },
+ "IssueWatchersRemove": { "index": 14, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The watchers of the issue to remove", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_WATCHERS_REMOVE" },
+ "ParentIssueKey": { "index": 15, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the parent issue", "constantName": "org.apache.camel.component.jira.JiraConstants#PARENT_ISSUE_KEY" },
+ "ChildIssueKey": { "index": 16, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the child issue", "constantName": "org.apache.camel.component.jira.JiraConstants#CHILD_ISSUE_KEY" },
+ "linkType": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type of link", "constantName": "org.apache.camel.component.jira.JiraConstants#LINK_TYPE" },
+ "minutesSpent": { "index": 18, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "-1", "description": "The minutes spent", "constantName": "org.apache.camel.component.jira.JiraConstants#MINUTES_SPENT" }
},
"properties": {
"type": { "index": 0, "kind": "path", "displayName": "Type", "group": "common", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.jira.JiraType", "enum": [ "ADDCOMMENT", "ADDISSUE", "ATTACH", "DELETEISSUE", "NEWISSUES", "NEWCOMMENTS", "WATCHUPDATES", "UPDATEISSUE", "TRANSITIONISSUE", "WATCHERS", "ADDISSUELINK", "ADDWORKLOG", "FETCHISSUE", "FETCHCOMMENTS" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "descrip [...]
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index 52d3831c7a7..84de91928ef 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -439,7 +439,7 @@ Enriches a message with data from a secondary resource
<xs:annotation>
<xs:documentation xml:lang="en">
<![CDATA[
-Camel error handling.
+Error handler settings
]]>
</xs:documentation>
</xs:annotation>
diff --git a/components/camel-jira/src/generated/resources/org/apache/camel/component/jira/jira.json b/components/camel-jira/src/generated/resources/org/apache/camel/component/jira/jira.json
index 3b6b82ce7f0..f80cdf2e82b 100644
--- a/components/camel-jira/src/generated/resources/org/apache/camel/component/jira/jira.json
+++ b/components/camel-jira/src/generated/resources/org/apache/camel/component/jira/jira.json
@@ -36,24 +36,25 @@
"verificationCode": { "index": 11, "kind": "property", "displayName": "Verification Code", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.jira.JiraConfiguration", "configurationField": "configuration", "description": "(OAuth only) The verification code from Jira generated in the first step of the authorization proccess." }
},
"headers": {
- "IssueAssignee": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The assignee's name of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_ASSIGNEE" },
- "IssueComponents": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The comma separated list of the issue's components", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_COMPONENTS" },
- "IssueChanged": { "index": 2, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the updated field (i.e Status)", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_CHANGED" },
- "IssueKey": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_KEY" },
- "IssuePriorityId": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The priority's id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_PRIORITY_ID" },
- "IssuePriorityName": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The priority's name of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_PRIORITY_NAME" },
- "ProjectKey": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The project's id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_PROJECT_KEY" },
- "IssueSummary": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The summary of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_SUMMARY" },
- "IssueTransitionId": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The transition id", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_TRANSITION_ID" },
- "IssueTypeId": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type's id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_TYPE_ID" },
- "IssueTypeName": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type's name of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_TYPE_NAME" },
- "IssueWatchedIssues": { "index": 11, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of all issue keys that are watched in the time of update", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_WATCHED_ISSUES" },
- "IssueWatchersAdd": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The comma separated list of watchers to add to the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_WATCHERS_ADD" },
- "IssueWatchersRemove": { "index": 13, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The watchers of the issue to remove", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_WATCHERS_REMOVE" },
- "ParentIssueKey": { "index": 14, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the parent issue", "constantName": "org.apache.camel.component.jira.JiraConstants#PARENT_ISSUE_KEY" },
- "ChildIssueKey": { "index": 15, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the child issue", "constantName": "org.apache.camel.component.jira.JiraConstants#CHILD_ISSUE_KEY" },
- "linkType": { "index": 16, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type of link", "constantName": "org.apache.camel.component.jira.JiraConstants#LINK_TYPE" },
- "minutesSpent": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "-1", "description": "The minutes spent", "constantName": "org.apache.camel.component.jira.JiraConstants#MINUTES_SPENT" }
+ "IssueAssigneeId": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The assignee's id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_ASSIGNEE_ID" },
+ "IssueAssignee": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The assignee's name of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_ASSIGNEE" },
+ "IssueComponents": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The comma separated list of the issue's components", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_COMPONENTS" },
+ "IssueChanged": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the updated field (i.e Status)", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_CHANGED" },
+ "IssueKey": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_KEY" },
+ "IssuePriorityId": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The priority's id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_PRIORITY_ID" },
+ "IssuePriorityName": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The priority's name of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_PRIORITY_NAME" },
+ "ProjectKey": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The project's id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_PROJECT_KEY" },
+ "IssueSummary": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The summary of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_SUMMARY" },
+ "IssueTransitionId": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The transition id", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_TRANSITION_ID" },
+ "IssueTypeId": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type's id of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_TYPE_ID" },
+ "IssueTypeName": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type's name of the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_TYPE_NAME" },
+ "IssueWatchedIssues": { "index": 12, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of all issue keys that are watched in the time of update", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_WATCHED_ISSUES" },
+ "IssueWatchersAdd": { "index": 13, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The comma separated list of watchers to add to the issue", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_WATCHERS_ADD" },
+ "IssueWatchersRemove": { "index": 14, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The watchers of the issue to remove", "constantName": "org.apache.camel.component.jira.JiraConstants#ISSUE_WATCHERS_REMOVE" },
+ "ParentIssueKey": { "index": 15, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the parent issue", "constantName": "org.apache.camel.component.jira.JiraConstants#PARENT_ISSUE_KEY" },
+ "ChildIssueKey": { "index": 16, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the child issue", "constantName": "org.apache.camel.component.jira.JiraConstants#CHILD_ISSUE_KEY" },
+ "linkType": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type of link", "constantName": "org.apache.camel.component.jira.JiraConstants#LINK_TYPE" },
+ "minutesSpent": { "index": 18, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "-1", "description": "The minutes spent", "constantName": "org.apache.camel.component.jira.JiraConstants#MINUTES_SPENT" }
},
"properties": {
"type": { "index": 0, "kind": "path", "displayName": "Type", "group": "common", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.jira.JiraType", "enum": [ "ADDCOMMENT", "ADDISSUE", "ATTACH", "DELETEISSUE", "NEWISSUES", "NEWCOMMENTS", "WATCHUPDATES", "UPDATEISSUE", "TRANSITIONISSUE", "WATCHERS", "ADDISSUELINK", "ADDWORKLOG", "FETCHISSUE", "FETCHCOMMENTS" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "descrip [...]
diff --git a/components/camel-jira/src/main/docs/jira-component.adoc b/components/camel-jira/src/main/docs/jira-component.adoc
index 12e2ad7d2ed..c8a03f8a134 100644
--- a/components/camel-jira/src/main/docs/jira-component.adoc
+++ b/components/camel-jira/src/main/docs/jira-component.adoc
@@ -91,13 +91,17 @@ You can bind the `JiraRestClientFactory` with name *JiraRestClientFactory* in th
== Authentication
-Camel-jira supports *https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-basic-authentication/[Basic Authentication]*, *https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-oauth-authentication/[OAuth 3 legged authentication]* and *https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html*.
+Camel-jira supports the following forms of authentication:
-We recommend to use OAuth whenever possible, as it provides the best security for your users and system.
+* https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-basic-authentication/[Basic Authentication]
+* https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-oauth-authentication/[OAuth 3 legged authentication]
+* https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html[Personal Token]*
+
+We recommend to use OAuth or Personal token whenever possible, as it provides the best security for your users and system.
=== Basic authentication requirements:
-* An username and a password or the API Token. Verify if the Jira server installation supports the use of https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/[API Tokens] instead of the user's password. This way the user's password is not exposed.
+* An username and a password.
=== OAuth authentication requirements:
@@ -111,10 +115,9 @@ to generate the client private key, consumer key, verification code and access t
=== Personal access token authentication requirements:
-Follow the tutorial in https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html
-to generate an access token bearer.
+Follow the tutorial to generate the https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html[Personal Token].
-* An access token
+* You have to set only the personal token in the `access-token` parameter.
== JQL:
@@ -169,9 +172,10 @@ Required:
Optional:
* `IssueAssignee`: the assignee user
+* `IssueAssigneeId`: the assignee user id
* `IssuePriorityId` or `IssuePriorityName`: The priority of the issue, you can see the valid list in `\http://jira_server/rest/api/2/priority`.
* `IssueComponents`: A list of string with the valid component names.
-* `IssueWatchersAdd`: A list of strings with the usernames to add to the watcher list.
+* `IssueWatchersAdd`: A list of strings with the usernames (or id) to add to the watcher list.
* `IssueDescription`: The description of the issue.
== AddComment
@@ -210,6 +214,7 @@ Required:
* `IssueTypeId` or `IssueTypeName`: The `id` of the issue type or the name of the issue type, you can see the valid list in `\http://jira_server/rest/api/2/issue/createmeta?projectKeys=SAMPLE_KEY`.
* `IssueSummary`: The summary of the issue.
* `IssueAssignee`: the assignee user
+* `IssueAssigneeId`: the assignee user id
* `IssuePriorityId` or `IssuePriorityName`: The priority of the issue, you can see the valid list in `\http://jira_server/rest/api/2/priority`.
* `IssueComponents`: A list of string with the valid component names.
* `IssueDescription`: The description of the issue.
@@ -217,7 +222,7 @@ Required:
== Watcher
* `IssueKey`: The issue key identifier.
-* `IssueWatchersAdd`: A list of strings with the usernames to add to the watcher list.
+* `IssueWatchersAdd`: A list of strings with the usernames (or id) to add to the watcher list.
* `IssueWatchersRemove`: A list of strings with the usernames to remove from the watcher list.
== WatchUpdates (consumer)
diff --git a/components/camel-jira/src/main/java/org/apache/camel/component/jira/JiraConstants.java b/components/camel-jira/src/main/java/org/apache/camel/component/jira/JiraConstants.java
index e7413958b3d..bf45041aade 100644
--- a/components/camel-jira/src/main/java/org/apache/camel/component/jira/JiraConstants.java
+++ b/components/camel-jira/src/main/java/org/apache/camel/component/jira/JiraConstants.java
@@ -26,6 +26,8 @@ public interface JiraConstants {
String JIRA_URL = "jiraUrl";
String PRIVATE_KEY = "privateKey";
String CONSUMER_KEY = "consumerKey";
+ @Metadata(label = "producer", description = "The assignee's id of the issue", javaType = "String")
+ String ISSUE_ASSIGNEE_ID = "IssueAssigneeId";
@Metadata(label = "producer", description = "The assignee's name of the issue", javaType = "String")
String ISSUE_ASSIGNEE = "IssueAssignee";
@Metadata(label = "producer", description = "The comma separated list of the issue's components", javaType = "String")
diff --git a/components/camel-jira/src/main/java/org/apache/camel/component/jira/producer/AddIssueProducer.java b/components/camel-jira/src/main/java/org/apache/camel/component/jira/producer/AddIssueProducer.java
index 3c21bc365c2..82d3f29654e 100644
--- a/components/camel-jira/src/main/java/org/apache/camel/component/jira/producer/AddIssueProducer.java
+++ b/components/camel-jira/src/main/java/org/apache/camel/component/jira/producer/AddIssueProducer.java
@@ -23,8 +23,11 @@ import com.atlassian.jira.rest.client.api.IssueRestClient;
import com.atlassian.jira.rest.client.api.JiraRestClient;
import com.atlassian.jira.rest.client.api.domain.BasicIssue;
import com.atlassian.jira.rest.client.api.domain.Issue;
+import com.atlassian.jira.rest.client.api.domain.IssueFieldId;
import com.atlassian.jira.rest.client.api.domain.IssueType;
import com.atlassian.jira.rest.client.api.domain.Priority;
+import com.atlassian.jira.rest.client.api.domain.input.ComplexIssueInputFieldValue;
+import com.atlassian.jira.rest.client.api.domain.input.FieldInput;
import com.atlassian.jira.rest.client.api.domain.input.IssueInputBuilder;
import org.apache.camel.Exchange;
import org.apache.camel.component.jira.JiraEndpoint;
@@ -50,6 +53,7 @@ public class AddIssueProducer extends DefaultProducer {
String summary = exchange.getIn().getHeader(ISSUE_SUMMARY, String.class);
// optional fields
String assigneeName = exchange.getIn().getHeader(ISSUE_ASSIGNEE, String.class);
+ String assigneeId = exchange.getIn().getHeader(ISSUE_ASSIGNEE_ID, String.class);
String priorityName = exchange.getIn().getHeader(ISSUE_PRIORITY_NAME, String.class);
Long priorityId = exchange.getIn().getHeader(ISSUE_PRIORITY_ID, Long.class);
String components = exchange.getIn().getHeader(ISSUE_COMPONENTS, String.class);
@@ -105,6 +109,9 @@ public class AddIssueProducer extends DefaultProducer {
}
if (assigneeName != null) {
builder.setAssigneeName(assigneeName);
+ } else if (assigneeId != null) {
+ builder.setFieldInput(
+ new FieldInput(IssueFieldId.ASSIGNEE_FIELD, ComplexIssueInputFieldValue.with("id", assigneeId)));
}
IssueRestClient issueClient = client.getIssueClient();
diff --git a/components/camel-jira/src/main/java/org/apache/camel/component/jira/producer/UpdateIssueProducer.java b/components/camel-jira/src/main/java/org/apache/camel/component/jira/producer/UpdateIssueProducer.java
index e0d8fd04542..f54a15647a7 100644
--- a/components/camel-jira/src/main/java/org/apache/camel/component/jira/producer/UpdateIssueProducer.java
+++ b/components/camel-jira/src/main/java/org/apache/camel/component/jira/producer/UpdateIssueProducer.java
@@ -21,8 +21,11 @@ import java.util.List;
import com.atlassian.jira.rest.client.api.IssueRestClient;
import com.atlassian.jira.rest.client.api.JiraRestClient;
+import com.atlassian.jira.rest.client.api.domain.IssueFieldId;
import com.atlassian.jira.rest.client.api.domain.IssueType;
import com.atlassian.jira.rest.client.api.domain.Priority;
+import com.atlassian.jira.rest.client.api.domain.input.ComplexIssueInputFieldValue;
+import com.atlassian.jira.rest.client.api.domain.input.FieldInput;
import com.atlassian.jira.rest.client.api.domain.input.IssueInputBuilder;
import org.apache.camel.Exchange;
import org.apache.camel.component.jira.JiraEndpoint;
@@ -30,6 +33,7 @@ import org.apache.camel.support.DefaultProducer;
import org.apache.camel.util.ObjectHelper;
import static org.apache.camel.component.jira.JiraConstants.ISSUE_ASSIGNEE;
+import static org.apache.camel.component.jira.JiraConstants.ISSUE_ASSIGNEE_ID;
import static org.apache.camel.component.jira.JiraConstants.ISSUE_COMPONENTS;
import static org.apache.camel.component.jira.JiraConstants.ISSUE_KEY;
import static org.apache.camel.component.jira.JiraConstants.ISSUE_PRIORITY_ID;
@@ -56,6 +60,7 @@ public class UpdateIssueProducer extends DefaultProducer {
String issueTypeName = exchange.getIn().getHeader(ISSUE_TYPE_NAME, String.class);
String summary = exchange.getIn().getHeader(ISSUE_SUMMARY, String.class);
String assigneeName = exchange.getIn().getHeader(ISSUE_ASSIGNEE, String.class);
+ String assigneeId = exchange.getIn().getHeader(ISSUE_ASSIGNEE_ID, String.class);
String priorityName = exchange.getIn().getHeader(ISSUE_PRIORITY_NAME, String.class);
Long priorityId = exchange.getIn().getHeader(ISSUE_PRIORITY_ID, Long.class);
String components = exchange.getIn().getHeader(ISSUE_COMPONENTS, String.class);
@@ -101,6 +106,9 @@ public class UpdateIssueProducer extends DefaultProducer {
}
if (assigneeName != null) {
builder.setAssigneeName(assigneeName);
+ } else if (assigneeId != null) {
+ builder.setFieldInput(
+ new FieldInput(IssueFieldId.ASSIGNEE_FIELD, ComplexIssueInputFieldValue.with("id", assigneeId)));
}
IssueRestClient issueClient = client.getIssueClient();
issueClient.updateIssue(issueKey, builder.build()).claim();