-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FUS-5906 #4
base: main
Are you sure you want to change the base?
FUS-5906 #4
Conversation
jira/jira-v1.asciidoc
Outdated
|
||
* `${LW_BATCH_SIZE}` - This variable is used to set the `limit` query parameter, which controls the number of results that are returned in the response for both `blogpost` and `pages`. | ||
|
||
* `${LW_INDEX_START}` - This variable is used to set the `start` query parameter, which is used to traverse the pagination. Jira pagination is zero-index-based. This means the first page number is 0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to: Add Used with pagination feature. This variable is used to set the startAt
query parameter, which is used to traverse the pagination. Jira pagination is zero-index-based. This means the first page number is 0.
jira/jira-v1.asciidoc
Outdated
|
||
== Pagination information | ||
|
||
This recipe is configured to use pagination by batch size. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This recipe is configured to use pagination by batch size. Needs to configure Query Params, and the property 'Pagination By BatchSize'
Query Params:
maxResults=${LW_BATCH_SIZE}
, where${LW_BATCH_SIZE}
is a variablestartAt=${LW_INDEX_START}
, where${LW_INDEX_START}
is a variable
- Configure the 'Pagination By BatchSize' properties
- IndexStart: The starting point. Set to 0 because the Atlassian pagination is zero-index-base. From the queries above, it replaces variable
${LW_INDEX_START}
, the plugin internally increases the value of the indexStart ensuring each page is requested with an updated start-point. - BatchSize: The number of elements to retrieve. Set to 50 by default. From the queries above, it replaces variable
${LW_BATCH_SIZE}
- Stop Condition Key: Reference the “key” in the response, that needs to be met in order to stop the pagination. To paginate issues, it must be “issues”, to paginate projects it must be 'values'
- Stop Condition Value: Reference the “value” in the response, that needs to be met in order to stop the pagination. For the jira config, to stop pagination the list of objects retrieved must be empty, then the stop condition should be
[]
jira/jira-v1.json
Outdated
"childResponseMapping": { | ||
"childDataId": "self", | ||
"binaryResponse": true, | ||
"parentNestedData": "issues[*].fields.attachment[*]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to change to `"parentNestedData": "fields.attachment[*]", otherwise the attachment metadata list will not be extracted
jira/jira-v1.asciidoc
Outdated
|Root Request |/rest/api/2/search|GET |fields=assignee,issuetype,priority,project,reporter,status,summary,updated,attachment&startAt=1&maxResults=50|Returns all jira issues. Each issue contains its list of attachments metadata | ||
|Child Request |/rest/api/2/issue/${LW_PARENT_DATA_KEY}/comment|GET|startAt=0&maxResult=50|Returns all comments. The request requires the 'issue Id'. Internally, the plugin replaces the variable ${LW_PARENT_DATA_KEY} with the 'issue id', which value is extracted from the 'issue object' (root object) by setting the parentDataKey property. | ||
|Child Request |/rest/api/2/issue/${LW_PARENT_DATA_KEY}/worklog | GET |startAt=0&maxResult=50 |Returns all worklogs. The request requires the 'issue Id'. Internally, the plugin replaces the variable ${LW_PARENT_DATA_KEY} with the 'issue id', which value is extracted from the 'issue object' (root object) by setting the parentDataKey property. | ||
|Child Request |/rest/api/2/attachment/content/${LW_PARENT_DATA_KEY}|GET|-|Use root response containing attachment Id's to retrieve attachments. The following jsonpath is used to retrieve the attachment id's `fields.attachment[*]` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DavidDwyer87 I suggest to change description to: Download the attachment content. The request requires the 'attachment Id'. Internally, the plugin replaces the variable ${LW_PARENT_DATA_KEY} with the 'attachment id', which value is extracted in two steps: step-1) setting prop parentNestedDataPath= fields.attachment[*] to extract the attachment metadata list from the issue object step-2) setting prop parentDataKey=id to extract the 'id' from each attachment metadata. The download request will be performed per each attachment metadata found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DavidDwyer87 this explanation is to describe how the /rest/api/2/attachment/content/${LW_PARENT_DATA_KEY}
will download the attachments
|
||
The Jira REST configuration variables used are: | ||
|
||
* `${LW_BATCH_SIZE}` - Used with pagination feature. This variable is used to set the `limit` query parameter, which controls the number of results that are returned in the response for both `blogpost` and `pages`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DavidDwyer87 this description is referencing confluence stuff (limit, blogspost, pages). Update to reference to Jira ->
Used with pagination feature. This variable is used to set the maxResults query parameter, which controls the number of results that are returned in the response for projects, issues, comments, worklogs
|
||
* `${LW_INDEX_START}` - Used with pagination feature. This variable is used to set the startAt query parameter, which is used to traverse the pagination. Jira pagination is zero-index-based. This means the first page number is 0. | ||
|
||
* `${LW_PARENT_DATA_KEY}` - Used with pagination feature. This variable is used to set the maxResults query parameter, which controls the number of results that are returned in the response for projects, issues, comments, worklogs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not describing the variable correctly, it should be ->
Used with Child Request Configuration. This variable is replaced with the 'id' extracted from root object, by setting the property parentDataKey. The jira use case indicates this variable can be added the URL to execute a GET request to retrieve comments, worklogs and attachments from issues
|======================= | ||
|Request type|Endpoint|HTTP operation |Query parameter |Description | ||
|
||
|Root Request |/rest/api/2/search|GET |fields=assignee,issuetype,priority,project,reporter,status,summary,updated,attachment&startAt=1&maxResults=50|Returns all jira issues. Each issue contains its list of attachments metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DavidDwyer87 description for Project Root Request is missing
@@ -0,0 +1,114 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why there are two json files jira/jira-v1.json
and sample-jira-setup.json
? the second one does not configure the projects endpoint
] | ||
}, | ||
"rootResponseMapping": { | ||
"dataId": "self", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DavidDwyer87 I saw the dataId for project was updated to use key
, maybe that should be made the same for issues?, also use key
here instead of self?
https://lucidworks.atlassian.net/browse/FUS-5906