Download Admin Manual - FIT Tracking Solutions
Transcript
To use any of the formula classes, you must provide an OGNL formula (see Rank documentation), which is used to retrieve data from the issue history. This formula allows you to access values and methods for the internal BugStruct class for each issue. Some valuable methods for metrics include: // finds the date that the issue was changed FROM a value for a specified field // or (last=true) the last time it changed FROM that value dateChangedFrom(int fieldId, String value1, boolean last) // finds the date that the issue was changed to a value for a specified field // if value2 is not null, it finds when the issue changed from value1 to value2. // or (last=true) the last time it changed to that value // if value1 is null, this will just return when the field was changed (to any value) dateChangedTo(int fieldId, String value1, String value2, boolean last) dateLastChangedTo(int fieldId, String value1, String value2) // find the time taken for an issue to move from one value to another // fieldId : the id of the field holding the desired value. (Reference ids in custom field setup) // Note: custom fields are > 100, default fields <100) // format may take the form of "m", "h", or "d" for (months, hours, or days) elapsedTimeBetweenStates(int fieldId, String value1, String value2, String format) elapsedTimeBetweenDates(Date d1, Date d2, String format) Here are a few examples: Example 1: Time taken to move from status A to status B (in days) - Find the id (SID) of the field that holds the status you are interested in. - Define a custom field called TimeTakenAB using the "custom" advanced field option as follows: Custom Class : com.other.FormulaIntCustomUserField Custom Class Formula: elapsedTimeBetweenStates(SID, "A", "B", "d") The TimeTakenAB field should now show the number of days that each issue took to move from state "A" to state "B". A value of 0 is given for issues where the states were not found. Example 2: Which issues had a field changed to XYZ during the last week. 111