Setting up automatic issue creation

To manage the workflows for official employment and onboarding of new employees, create a queue where you will track procedural matters, provision of equipment and access permissions, and the progress of probation period. Automate the creation of an appropriate issue pool when the candidate issue is closed with the Hired resolution.

Create a queue for new employees

  1. Create a queue using the HR processes template.
  2. Enter a name for the queue. For example, Employment Queue.
  3. Set up a workflow or create a new one if needed.
  4. Specify the default issue type, such as New employees, for the workflow.
  5. Set up queue access permissions to protect employee personal data.

Add issue types

Create separate issue types for various procedures related to employment and onboarding of new employees. For example, to grant access permissions and provide equipment, create an issue type named Access permissions and equipment:

  1. Click  Queue settings in the top right corner of the Employment Queue page.
  2. In the left panel, select Workflows.
  3. Click  Add issue type and select an issue type from the list.
  4. To add a resolution, such as Resolved, hover over the issue type line and click .

Only an administrator can create new issue types. Make sure the issue types are unique.

Set up a trigger in the Candidates Queue

To automate replication of issues from the Candidates Queue to the Employment Queue, create a trigger that will fire when the candidate issue status changes to Hired:

  1. Click  Queue settings in the top right corner of the Candidates Queue page.

  2. Select Automation in the left-hand panel.

  3. In the top right corner, click CreateTrigger.

  4. Name the trigger. For example: Candidate hired.

  5. In the  Under condition section, specify Statusbecame equal toHired (the status you created in the Candidates Queue workflow). Read more about trigger conditions here.

  6. Under  Perform actions, select HTTP request.

  7. In the form that opens, enter the request parameters. In the Request body field, set the parameters of a new sub-issue. To substitute the values from the original issue, use variables:

    Field

    Content

    Method

    POST

    Address

    https://api.tracker.yandex.net/v3/issues

    Authorization method

    OAuth 2.0

    Token

    <OAuth_token> (see How to get a token)

    Authorization header

    Authorization

    Token type

    OAuth

    Content type

    application/json

    Request body

    {
       "queue": "<Employment_Queue_key>",
       "summary": {{issue.summary.json}},
       "description": {{issue.description.json}},
       "type": "<New_Employees_issue_key>",
       "parent": "{{issue.key}}"
    }
    

    Headers

    Header: X-Org-ID.
    Value: Organization ID. To look up the ID, go to AdministrationOrganizations (the ID field).

    Make sure that the parameters you pass in the request body via variables are specified in the original issue. Otherwise, the trigger won't fire.

  8. To save the trigger, click Create.

Set up a trigger in the Employment Queue

Once the candidate issue is copied to the Employment Queue, you need to create sub-issues related to the new employee in the same queue, such as: Access permissions and equipment, Completion of documents, or Probation period. To automate sub-issue creation, create a trigger that will fire when the new employee's issue status changes to In progress. To make sure the trigger only fires for issues of the New employees type, specify this type in the trigger conditions.

Create a trigger

  1. Click  Queue settings in the top right corner of the Employment Queue page.
  2. Select Automation in the left-hand panel.
  3. In the top right corner, click CreateTrigger.
  4. Name the trigger. For example: New employee.
  5. In the  Under condition section, set two conditions:
    • Statusbecame equal toIn progress (the status you created in the Candidates Queue workflow).
    • Typeis equal toNew employee (the issue type you created in the Candidates Queue workflow).
      Read more about trigger conditions here.
  6. Under  Perform actions, select HTTP request.
  7. In the form that opens, enter the request parameters as you did earlier. In the Request body field, update the issue type description and key, for example:
{
    "queue":"<Employment_Queue_key>",
    "summary":{{issue.summary.json}},
    "description":"Grant access and provide equipment",
    "type":"<Access_Permissions_and_Equipment_issue_key>",
    "parent":"{{issue.key}}"
}

Add actions

To automatically create other sub-issues, add the appropriate actions to the trigger:

  1. Under  Perform actions, select HTTP request.

  2. Fill out the form as you did earlier. In the Request body field, update the issue type description and key, for example:

    {
        "queue":"<Employment_Queue_key>",
        "summary":{{issue.summary.json}},
        "description":"Probation period",
        "type":"<Probation_Period_issue_type_key>",
        "parent":"{{issue.key}}"
    }
    
  3. Repeat the steps to add actions for other issues.

  4. To save the trigger, click Create.

Test the triggers

  1. On the Candidate Queue page, select the test issue and change the status to Hired.
  2. Make sure a new issue has appeared on the Employment Queue page.
  3. Open the issue and select In progress in the status field.
  4. Make sure the queue now contains all the appropriate sub-issues.