Basics
To add a custom field you just need to give it a name and some parameters. JIRA has a default selection of field types (e.q. text, dropdown menu) to choose from.
Customd field types extend JIRA's functionality. Custom fields types are needed when you want to perform complex validations or create fields that use external information sources.
Custom fields are used the same way as JIRA default fields. You can add them in transition screens and make them visible for only some of the issue types.
Multiple outages
Field takes start and end times in UTC format. It doesn't accept overlapping values. Description is optional.
History based action update
Field shows in UI as a normal text field. After saving previous values are printed above the field and they are not editable.
Total outage calculation
Total outage is automatically calculated after the ticket is saved.
Calculation is done with a custom post function.
Calculated outage is filled in uneditable text field Total outage.
See also: Validators
Scope Selection
New text field appears when value "other" is chosen for scope.
Related tickets
When ticket is saved custom field related tickets searches for tickets that have same value(s) in the fields Connection, Equipment, Site or Affected customers. Related tickets is placed on tab Knowledge management.
TODO: ordering search result by relevance
Related customers
Customer information pages are marked in Confluence using metadata plugin. Ticket shows links to pages with same metadata value as in Affected organisations.
Instructions: xxx
Problem start / end with outages
This set off custom fields needs:
- Fields for problem start / end in edit mode (filled manually)
- Fields for problem start / end in view mode (filled automatically)
- Hiding field, that handles showing and hiding the fields above in different modes
- Validator for "Validate that Problem start is not after first outage start in Outages and that Problem end is not before last outage end in Outages "
- Post function for "Autofill Problem start (calculated) and Problem end (calculated) from Problem start and Problem end if they are filled, otherwise autofill from Outages "