Worklog Attribute Applicability Expression

It is possible to restrict a Jira worklog attribute for only specific types of issues, projects or users. You can do this by using a JSONata expression. Although JSONata can query a JSON document and return arrays, strings, object, for the scope of applicability checks, you need to return a Boolean value. If the returned value is true, attribute will be displayed, otherwise it will not be displayed.

Please also note that, this applicability is only obeyed if you log work using WorklogPRO’s own “Log Work” dialog. If you log work using Jira’s own “Log Work" dialog, or using another app, or using the REST API, you can bypass this restriction. Also, you can move issues between different projects. These operations may bypass applicability rules.

You can find some example statements below, if you need help to write your expression, you can always request our help.

Check Project

This example checks for a specific project using the key of the project.

issue.fields.project.key = "My Jira Project"
Check Project Category

This example checks whether the project’s category name is “External”. You can also check category “id” instead of name by replacing “.name” with “.id” and using the actual category id.

issue.fields.project.projectCategory.name = "External"
Check Current User has “Jira Service Desk” Access

You can also use “jira-software" or “jira-core" for checking access to different applications.

$boolean($filter(user.applicationRoles.items.key, function($v) {$v = 'jira-servicedesk'}))
Check Current User is in a Specific Jira User Group

Instead of group name, you can also use “groupId”. But, if you are not going to change group names, using group name makes the expression more readable.

Check Current Issue Type

The following expression only allows Jira worklog attribute if issue type is either Story or Epic.

Check Issue Doesn’t Have Subtasks

The following expression only allows Jira worklog attribute if issue doesn’t have any subtask. You can easily reverse the expression by using “!=” instead of “=”.