Using Smart Values
Smart Values are computed expressions that calculate field values dynamically. They enable automation like date calculations, field references, and user data access.
Use Smart Values with the Set Field Value action to auto-populate fields with context-aware data.
What Are Smart Values?
Smart Values are expressions that evaluate to a value at runtime, rather than using static text or numbers.
Example comparison:
Static value:
Set Due Date = "2026-03-15"Always sets March 15, 2026. Never changes.
Smart Value:
Set Due Date = addDays(today(), 7)Calculates 7 days from today when the rule executes. Adapts to current date.
When to Use Smart Values
Calculate dates: Set due dates relative to today, calculate SLA deadlines, set dates to specific days
Reference fields: Copy values from one field to another, create dependent field relationships
Access user data: Auto-fill assignee or reporter fields with current user
Ensure consistency: Auto-fill fields with calculated values instead of manual entry
Date Functions
All date functions work in UTC to avoid timezone issues.
Current Date/Time Functions
now()
now()Returns: Current date and time in UTC
Example:
today()
today()Returns: Today's date at midnight UTC (00:00:00)
Example:
yesterday()
yesterday()Returns: Yesterday's date at midnight UTC (00:00:00)
Example:
tomorrow()
tomorrow()Returns: Tomorrow's date at midnight UTC (00:00:00)
Example:
Date Navigation Functions
nextWeek()
nextWeek()Returns: Date 7 days from today at midnight UTC (00:00:00)
Example:
nextMonth()
nextMonth()Returns: Date one month from today at midnight UTC (00:00:00)
Example:
startOfWeek()
startOfWeek()Returns: Start of current week (Monday) at midnight UTC (00:00:00)
Note: Week starts on Monday
Example:
endOfWeek()
endOfWeek()Returns: End of current week (Sunday) at midnight UTC (00:00:00)
Note: Week ends on Sunday
Example:
endOfMonth()
endOfMonth()Returns: Last day of current month at midnight UTC (00:00:00)
Example:
startOfDay(date)
startOfDay(date)Parameters:
date- A date value
Returns: Start of day (midnight UTC) for the given date
Example:
Date Arithmetic Functions
addDays(date, days)
addDays(date, days)Parameters:
date- A date valuedays- Number of days to add (can be negative)
Returns: Date with specified number of days added
Example:
addWeeks(date, weeks)
addWeeks(date, weeks)Parameters:
date- A date valueweeks- Number of weeks to add (7 days each)
Returns: Date with specified number of weeks added
Example:
subtractBusinessDays(date, days)
subtractBusinessDays(date, days)Parameters:
date- A date valuedays- Number of business days to subtract
Returns: Date with specified business days subtracted, skipping weekends (Saturday/Sunday)
Note: Business days are Monday-Friday
Example:
Date Methods
Date objects can have methods called on them using dot notation.
date.plusBusinessDays(days)
date.plusBusinessDays(days)Parameters:
days- Number of business days to add
Returns: Date with specified business days added, skipping weekends (Saturday/Sunday)
Note: Business days are Monday-Friday. Called as a method on a Date object.
Example:
Field Functions
field(fieldId)
field(fieldId)Parameters:
fieldId- Field ID or system name (e.g., "duedate", "summary", "customfield_10001")
Returns: Current value of the specified Jira field. Return type varies by field: string, number, Date, array, or undefined if field is empty.
Example:
Common field names:
duedate- Due Datesummary- Summarydescription- Descriptionpriority- Priorityassignee- Assigneereporter- Reportercustomfield_XXXXX- Custom fields (use field ID)
User Functions
currentUser()
currentUser()Returns: Current user executing the action, with accountId and displayName properties
Example:
Use case: Set Assignee or Reporter to current user
Practical Examples
Date Examples
Set due date to 7 days from now:
Set due date to next Friday:
Set review date to 3 business days from today:
Set start date to beginning of current week:
Set deadline to end of next month:
Field Reference Examples
Copy Due Date from another field:
Set Summary based on custom field:
User Examples
Set Assignee to current user:
Combining Smart Values
You can combine multiple functions to create complex calculations.
Due date 5 business days from now:
Start date at beginning of next week:
Date 3 days before a specific field's date:
Using Smart Values in Rules
Configuration Steps
Create a rule with Set Field Value action
Select the target field to populate
Enter a Smart Value expression in the value field
Save and test the rule
Example Rule
Requirement: Set Due Date to 3 business days from today when creating Bug issues
Configuration:
Screen: Global Issue Create
Target Field: Due Date
Scope: Bug issue type
Action: Set Field Value
Value:
today().plusBusinessDays(3)
Result: When creating a Bug, Due Date auto-fills with today + 3 business days.
Best Practices
Use descriptive expressions: Choose functions that clearly express intent (e.g., today().plusBusinessDays(5) is clearer than complex date math)
Test with different dates: Verify Smart Values work correctly across month/year boundaries
Account for weekends: Use business day functions when working days matter
Validate field existence: Ensure referenced fields exist in the project before using field() function
Keep it simple: Break complex calculations into multiple rules rather than one complex expression
Error Handling
If a Smart Value fails:
The field will not be set
The rule will not prevent form submission
Check rule configuration for syntax errors
Common issues:
Referencing non-existent fields with
field()Invalid field IDs
Incorrect function names or parameters
Limitations
Time zones: All dates use UTC. Jira may display dates in user's local timezone.
Field types: field() returns different data types depending on the field. Ensure compatibility with target field.
No nested conditionals: Complex logic should be handled with multiple rules, not one Smart Value expression.
Next Steps
Learn about actions:
Defining Actions - All seven actions including Set Field Value
See examples:
Use Cases & Examples - Real-world Smart Value applications
Understand conditions:
Defining Rule Conditions - Combine Smart Values with conditions
Ready to create rules with Smart Values? Start with Creating Your First Rule.
Last updated