Class NumberWrapper
java.lang.Object
com.codebarrel.automation.api.component.smartvalues.objectwrappers.NumberWrapper
- All Implemented Interfaces:
SmartValueWrapper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabs()asCurrency(String locale) asInt()asPercentage(String locale) ceil()Example usage: Time per person spent on a ticketExample usage: Check if a support ticket has only had one participantsbooleanfloor()format()formatWithLocale(String locale) static Numberstatic NumberExample usage: Check for a popular issueExample usage: You could use it to compare story points to set a t-shirt sizeinthashCode()Example usage: Check for issues with few commentsExample usage: Check a custom fields for how many options are selectedExample usage: You might want to set your target date as today + 3 days for each story pointExample usage: Automatically set your Story points to the current value and one for each subtaskround()toString()
-
Field Details
-
DEFAULT_LOCALE
-
-
Constructor Details
-
NumberWrapper
-
-
Method Details
-
abs
-
round
-
asInt
-
ceil
-
floor
-
asPercentage
-
asPercentage
-
asCurrency
-
asCurrency
-
gt
Example usage: Check for a popular issue
{{#if(issue.Votes.gt(100))}} Popular issue {{/}} -
gte
Example usage: You could use it to compare story points to set a t-shirt size
{{#if(issue.Story Points.gte(5))}} L {{/}} -
eq
Example usage: Check if a support ticket has only had one participants
{{#if(issue.Request Participants.size().eq(1))}} Only one person involved {{/}} -
lte
Example usage: Check a custom fields for how many options are selected
{{#if(issue.Multi Select custom field.size().lte(2))}} Only a few options selected {{/}} -
lt
Example usage: Check for issues with few comments
{{#if(issue.comments.size().lt(5))}} Not many comments here {{/}} -
plus
Example usage: Automatically set your Story points to the current value and one for each subtask
{{issue.Story Points.plus(issue.subtasks.size)}} -
minus
-
multiply
Example usage: You might want to set your target date as today + 3 days for each story point
{{issue.created.plusBusinessDays(issue.Story Points.multiply(3))}} -
divide
Example usage: Time per person spent on a ticket
We spent {{issue.timetracking.timeSpentSeconds.divide(360).divide(issue.Request participants.size)}} hours per person on this ticket -
format
-
format
-
formatWithLocale
-
toString
-
getNumber
-
getNumber
-
equals
-
hashCode
public int hashCode() -
getWrappedValue
- Specified by:
getWrappedValuein interfaceSmartValueWrapper
-