Tech review

Style guide

Page status

Use case

This use case will only display a Calculated field depending the usernames, user roles or user groups that we specify in our expression.

Configuration

Create a new Calculated Field (by JWT) custom field and name it appropriately. For the following example, we will use a Calculated date-time field

Providing a description will help you to identify what the custom field does, but this step is optional.

Parser expression

Depending on the functionality you want, the parser expression may change:


Display the Calculated field only to certain users

%{system.currentUser} in ["username1", "username2", "username3"] ? (my_expression) : null
If you want to change the expression to hide this Calculated field to those users, you would only have to change in for not not in

Display the Calculated field only to certain user roles

isInRole(%{system.currentUser}, "role1, role2, role3") ? (my_expression) : null
If you want to change the expression to hide this Calculated field to those user roles, you would only have to change isInRole for !isInRole

Display the Calculated field only to certain users groups

isInGroup(%{system.currentUser}, "group1, group2, group3") ? (my_expression) : null
If you want to change the expression to hide this Calculated field to those user groups, you would only have to change isInGroup for !isInGroup

Format type

Choose Date Time Picker

Add the field to the relevant view screens.

Remember: All calculated fields are read-only and cannot be manually updated.

Check the results

Once configured and added to an issue screen (e.g. an epic), the result will look like this:


 Related use cases


JWT feature

Field type

Date-time

Number

Text

Parser functions

isInRole()

isInGroup()

Operators

Label