Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

Table of Contents
minLevel1
maxLevel6
outlinefalse
typelist
printablefalse

Info

...

Config summary

Here's what you will have after completing this guideline:

  • A dedicated issue type associated with your absences Jira project;

  • A new field configuration and field configuration scheme configured and associated with your absences Jira project;

  • Project screens for both 'Create' and 'Edit/View Issue' operations set up; 

  • A new Power Scripts listener; 

  • Project workflow configured to match the integration scripts. 

Info

...

Required permissions

Requires either Jira System Administrators or Jira Administrators global permission. If you don't have such privileges, ask your Jira administrator for help.

...

Switch current project issue types to "Absence Request" type

  1. Open "Absences" project and jump to 'Project settings'. From there, select 'Issue types'. 

...

  1. Image Added
  2. Expand 'Actions' drop-down menu in the top right and select 'Edit issue types'. 

...

  1. Image Added
  2. Click 'Remove all' to move all of the current project issue types to 'Available Issue Types' list (1). Afterwards, they will no longer be used by the project. Next, find the "Absence Request" issue type on the 'Available Issue Types' list. Drag and drop it onto the 'Issue Types for Current Scheme' list (2). 

...

  1. Image Added
  2. Scroll down and click 'Save'. 

...

  1. Image Added
  2. You should end up with your project issue types configured as shown below.

...

  1. Image Added

...

Configure project field configuration

Considering a typical Jira instance may have more than one Jira project associated with the default field configuration, it is recommended for this integration to associate a different field config with the "Absences" project. This is because we'll make some of the custom fields required and want this change not to affect any other Jira project.
Image Modified

  1. Go to Jira administration > Issues > Fields > Field configurations. For the field config currently used by the "Absences" project click 'Copy'.  

...

  1. Image Added
  2. Change the name and description of a field config copy. Description field may be left empty. Once done, click 'Copy'.

...

  1. Image Added

...

  1. Image Added

  2. Click 'Configure' for the recently copied field config.

...

  1. Image Added
  2. For Absence Type, Manager/Approver, Start date and End date custom fields, click 'Required'. You may use '⌘ + f' to find the fields easier. 

...

  1. Image Added


    Once done, you should see 'Required' lozenge right next to the custom fields name. 

...

  1. Image Added
  2. Next, jump to the 'Field configuration schemes' screen and click 'Add field configuration scheme' in the upper right.

...

  1. Image Added
  2. Give it the "Absences" name and click 'Add'. Description field may be left empty.

...

  1. Image Added
  2. Right after, click 'Edit' under Actions.

...

  1. Image Added
  2. Switch the field configuration to the 'Absences' config created in step (2). Next, click 'Update'. 

...

  1. Image Added
  2. Go back to the "Absences" project settings and jump to the 'Fields' screen.

...

  1. Image Added

  2. Expand 'Actions' drop-down menu in the upper right and select 'Use a different scheme'.

...

  1. Image Added
  2. Switch the scheme to the 'Absences' entity added in step (6) and click 'Associate'.  

...

  1. Image Added
  2. As a final result you should see the 'Absences' scheme associated with the "Absences" project. 

...

  1. Image Added

...

Set up project screens

  1. Open "Absences" project and jump to 'Project settings'. From there, select 'Screens'.

...

  1. Image Added
  2. Open the screen for the 'Create Issue' operation. 

...

  1. Image Added
  2. Remove all of the fields from the Create Issue screen except for the 'Summary' field.

...

  1. Image Added

...

  1. Image Added

  2. Find and add the following custom fields: Manager/Approver, Absence Type, Reason/Comment, Start date, End date

...

  1. Image Added
  2. Go back to the 'Screens' and open the screen for the 'Edit/View Issue' operation. 

...

  1. Image Added
  2. Redo the step (3). Later, find and add the following custom fields: Manager/Approver, Absence Type, Reason/Comment, AttachmentStart date, End date. We've added the 'Attachment'

...

  1. field so that users could attach doctors notes or additional files as needed.

...

  1. Image Added
    Info

    We've used the 'Manager/Approver' field instead of assignee so that it could be controlled and filtered so only permitted managers could approve absence requests. However, this does conflict with the assignee field which is how most users (Managers in this case) will be expecting to identify issues that are assigned to them. To correct this, a listener can be configured so that whenever the 'Manager/Approver' field is changed the assignee is updated as well.


    Go to Jira administration > Manage apps > Power Apps Config > Power Scripts > Listeners. There, click 'Add listener'. 
    Image Modified

    Next, select the Issue events the script should fire on, i.e. Issue Created, Issue Updated, as well as the "Absences" project it should be applicable to. Later, click the pencil icon to select the 'assignManager.sil' script. 

...

  1. Image Added

...

  1. Image Added


    Once script has been selected, click 'Add' to add a listener. 

...

  1. Image Added


    You should end up with a listeners config looking like this. 

...

  1. Image Added

...

Set up project workflow

  1. Open "Absences" project and jump to 'Project settings'. From there, select 'Workflows'.

...

  1. Image Added
  2. Click on the pencil icon under 'Actions'. This will take you to the workflow designer screen. 

...

  1. Image Added
  2. Switch to 'Diagram'. 

...

  1. Image Added
  2. For the purpose of this user manual, we went ahead and redesigned the default project workflow so that it is simple and straightforward. 

    Info

    If you have a different workflow, that is fine. Just make sure there is exactly one 'Approve' transition in your workflow. 

...

  1. Image Added
  2. Select the 'Approve' transition and click 'Validators'.

...

  1. Image Added
  2. Click 'Add validator'. 

...

  1. Image Added
  2. Select 'SIL Validator' and click 'Add'. 

...

  1. Image Added
  2. Choose 'Existing Script' and click 'Next'.

...

  1. Image Added
  2. Click on the pencil icon to select script. 

...

  1. Image Added
  2. Expand 'silprograms' folder and go down to 'Workflow'. Then, select 'validator.sil' and click the 'Select' button.

...

  1. Image Added
  2. At the end, click 'Finish'. 

...

  1. Image Added
  2. Repeat the process but add 'recordAbsence.sil' script as another validator. 

  3. Go back to the workflow designer, select the 'Approve' transition again and click 'Post Functions'. 

...

  1. Image Added
  2. Click 'Add post function'.

...

  1. Image Added
  2. Select 'SIL Post-function' and click 'Add'.

...

  1. Image Added
  2. Choose 'Existing Script' and click 'Next'.

...

  1. Image Added
  2. Click on the pencil icon to select script.

...

  1. Image Added
  2. Expand 'silprograms' folder and go down to 'Workflow'. Then, select 'assignManager.sil' and click the 'Select' button.

...

  1. Image Added
  2. At the end, click 'Finish'. 

...

  1. Image Added

Use the down arrow to move the script entry to the very bottom of the list so that it becomes last in order. After that, publish the workflow by clicking 'Publish'.
Image Modified
Image Modified