How to bulk update a large volume of issues with iHub

This use case is where you have a large volume of issues that needs to be update.

 

Result will look like this tree, when done

 

Step 1. Get the issues to update

  1. Go to Issue Navigator in Jira and create a filter that includes the issues needed to be updated.

  2. Save the filter and copy the filter id from the URL

  3. Go to iHub and click Create

  4. Name the action Get Issue Data to be updated

  5. Select Template Category: Jira Core Server

  6. Select Template: Search

  7. Click Create

  8. Go to the URL part and add ?jql=filter=THE_ID_COPIED_IN_STEP_2

  9. Check the checkbox next to the URL called Pagination
    This will expand the pagination settings, since Jira will return 50 at the time you will need to read each page. Paginated requests
    Sample response

    { "expand": "schema,names", "startAt": 0, "maxResults": 50, "total": 167, "issues": [] }
  10. Add this to the breaking path: $.issues

  11. click Add in the pagination table enter startAt as the value and FIXED VALUE as type and additional value 0

  12. Save the action

 

Step 2 - Iterate each page of issues

  1. Click create and select the Get Issue Data to be updated action created in step 1 as parent

  2. Select Action type: Iteration

  3. Click Create

  4. Add $.issues as JSON path

Step - Update an issue

  1. Now create a child action by clicking the Create button again

  2. Enter a name, Update issue

  3. Select the iteration created in step 2 as parent

  4. Select Template Category: Jira Core Server

  5. Select Template: Edit Issue

  6. Click create

  7. Select the authentication user (BASIC AUTH)

  8. Modify the URL to be {{baseUrl}}/rest/api/2/issue/{{key}}
    This because each iteration will provide the child action with a payload similar to the one below

    { "expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields", "id": "10752", "self": "https://testsup.rixter.se/rest/api/2/issue/10752", "key": "ITSUP-34", "fields": { "issuetype": { "self": "https://testsup.rixter.se/rest/api/2/issuetype/10100", "id": "10100", "description": "For system outages or incidents. Created by Jira Service Desk.", "iconUrl": "https://testsup.rixter.se/secure/viewavatar?size=xsmall&avatarId=10700&avatarType=issuetype", "name": "Incident", "subtask": false, "avatarId": 10700 }, "timespent": null, "project": { "self": "https://testsup.rixter.se/rest/api/2/project/10201", "id": "10201", "key": "ITSUP", "name": "IT Support", "projectTypeKey": "service_desk", "avatarUrls": { "48x48": "https://testsup.rixter.se/secure/projectavatar?avatarId=10324", "24x24": "https://testsup.rixter.se/secure/projectavatar?size=small&avatarId=10324", "16x16": "https://testsup.rixter.se/secure/projectavatar?size=xsmall&avatarId=10324", "32x32": "https://testsup.rixter.se/secure/projectavatar?size=medium&avatarId=10324" } }, "fixVersions": [], "customfield_10110": { "_links": { "jiraRest": "https://testsup.rixter.se/rest/api/2/issue/10752", "web": "https://testsup.rixter.se/servicedesk/customer/portal/2/ITSUP-34", "self": "https://testsup.rixter.se/rest/servicedeskapi/request/10752" }, "requestType": { "id": "30", "_links": { "self": "https://testsup.rixter.se/rest/servicedeskapi/servicedesk/2/requesttype/30" }, "name": "Report a system problem", "description": "Having trouble with a system?", "helpText": "", "serviceDeskId": "2", "groupIds": [ "6" ], "icon": { "id": "10638", "_links": { "iconUrls": { "48x48": "https://testsup.rixter.se/secure/viewavatar?avatarType=SD_REQTYPE&size=large&avatarId=10638", "24x24": "https://testsup.rixter.se/secure/viewavatar?avatarType=SD_REQTYPE&size=small&avatarId=10638", "16x16": "https://testsup.rixter.se/secure/viewavatar?avatarType=SD_REQTYPE&size=xsmall&avatarId=10638", "32x32": "https://testsup.rixter.se/secure/viewavatar?avatarType=SD_REQTYPE&size=medium&avatarId=10638" } } } }, "currentStatus": { "status": "Closed", "statusDate": { "iso8601": "2021-02-15T09:39:20+0100", "jira": "2021-02-15T08:39:20.902+0000", "friendly": "15/Feb/21 9:39 AM", "epochMillis": 1613378360902 } } }, "customfield_10111": [], "aggregatetimespent": null, "resolution": { "self": "https://testsup.rixter.se/rest/api/2/resolution/10000", "id": "10000", "description": "Work has been completed on this issue.", "name": "Done" }, "resolutiondate": "2021-02-10T08:39:20.000+0000", "workratio": -1, "lastViewed": null, "watches": { "self": "https://testsup.rixter.se/rest/api/2/issue/ITSUP-34/watchers", "watchCount": 0, "isWatching": false }, "created": "2021-02-10T08:37:03.000+0000", .... more entries
  9. Go down to the Body and add the code below
    note that different custom fields has different formats needed.

    { "fields":{"customfield_10201":"MY AWESOME VALUE"} }
  10. Save the action

  11. Go to the first action and click Test, do not enter any issue key.

  12. This will take some time to run for large datasets, you can always check the execution log to see that it still runs.

 

More material

Update Jira custom field examples