Custom Fields

Basic structure of custom fields

Custom Field Configurations

JIRA does not have a mechanism for providing arbitrary configurations for custom fields from the UI. JIRA does however contain a mechanism for adding options to select type custom fields value lists. We use these options to configure some of our custom fields. The options are given as a key=value pairs and then parsed to a HashMap with com.eduix.jira.plugin.util.OptionsUtil. There are other kind of uses for the options as well where the configurations don't follow the key=value format

Custom field types

Multiple Outage Custom Field

Class

com.eduix.jira.plugin.customfield.MultipleOutageCFType

View helpers

  • com.eduix.jira.plugin.customfield.helpers.MultipleOutageViewHelper
    • generates markup for the outage tables

Javascript and css

Inline javascript for editing outage values in templates/jira/customfield/edit-multipleOutage.vm

Data format

Plain text where single outages are separated by char '
|' and each outage contains a start, an end and an optional message separated by char ';'. The dates are converted with com.eduix.jira.plugin.util.DateUtil and there is a utility com.eduix.jira.plugin.customfield.helpers.MultipleOutageHelper which can convert the plain text to a list of Outage objects.

Other dependencies

jQuery

History Text Custom Field

Class

com.eduix.jira.plugin.customfield.HistoryTextCFType

View helpers

  • com.eduix.jira.plugin.customfield.helpers.HistoryTextViewHelper
    • generates markup for the history

Javascript and css

 

Data format

Plain text with single entries separated by string '@@'. Every entry contains full name of the user, input date and text content each separated by string ";-;". The dates are converted with com.eduix.jira.plugin.util.DateUtil

Other dependencies

none

Scope Selection Custom Field

Class

com.eduix.jira.plugin.customfield.ScopeSelectCFType

View helpers

com.eduix.jira.plugin.customfield.helpers.ScopeViewHelper

Javascript and css

Inline javascript for handling the value testing and updating to the form input when the selection is changed

Data format

Plain text

Other dependencies

none

Horizontal Fields Custom Field

Class

com.eduix.jira.plugin.customfield.HorizontalFieldsCFType

View helpers

  • com.eduix.jira.plugin.customfield.helpers.HorizontalFieldsViewHelper
    • handles the custom field config options

Javascript and css

Inline javascript to call loaded javascript /templates/extra/js/tts.js and css loaded from tempates/extra/css/horizontal.css. Also depends on YUI

Data format

Field value is not used, only the options

Other dependencies

YUI

Field Hider Custom Field

Class

com.eduix.jira.plugin.customfield.FieldHiderCFType

View helpers

  • com.eduix.jira.plugin.customfield.helpers.FieldHiderViewHelper
    • handles the custom field config options

Javascript and css

Inline javascript to call loaded javascript /templates/extra/js/tts.js. Also depends on YUI

Data format

Field value is not used, only the options

Other dependencies

YUI

Total Outage Custom Field

Class

com.eduix.jira.plugin.customfield.TotalOutageCFType

View helpers

  • com.eduix.jira.plugin.customfield.TotalOutageViewHelper
    • formats the outage value

Javascript and css

 

Data format

Decimal number

Other dependencies

 

Related Issues Custom Field

Class

com.eduix.jira.plugin.customfield.RelatedIssuesCFType

View helpers

com.eduix.jira.plugin.customfield.helpers.DefaultViewHelper

Javascript and css

Inline javascript to query the related issues servlet

Data format

Field value is not used, only the options

Other dependencies

  • Jquery
  • com.eduix.jira.plugin.servlet.RelatedIssuesServlet
    • generates the actual list of related issues
    • depends on the Related Issues Service

Program flow related to dependencies

Notify Management Custom Field

Class

com.eduix.jira.plugin.customfield.NotifyManagementCFType

View helpers

com.eduix.jira.plugin.customfield.NotifyManagementViewHelper

Javascript and css

Inline javascript

Data format

Plain text

Other dependencies

 

Dynamic Value Picker Custom Field

Class

com.eduix.jira.plugin.customfield.DynamicValuePickerCFType

View helpers

com.eduix.jira.plugin.customfield.helpers.DynamicValuePickerViewHelper

Javascript and css

Inline javascript to open the value picker popup

Data format

 

Other dependencies

  • com.atlassian.jira.web.action.DynamicPickerAction
    • the value picker popup which depends on EditGrid
  • com.eduix.jira.plugin.servlet.AddWordToLexiconServlet
    • adds values to the workbooks in EditGrid

Program flow related to dependencies

When editing values:

When submitting values:

Vendor Messaging Custom Field

Class

com.eduix.jira.plugin.customfield.VendorMessagingCFType

View helpers

com.eduix.jira.plugin.customfield.helpers.DefaultViewHelper

Javascript and css

Inline javascript to query the message log and message preview. Stylesheet /templates/extra/css/vendor-messaging.css

Data format

Field value is not used

Other dependencies

  • PHP component to store/retrieve message log
  • com.eduix.jira.plugin.servlet.VendorMessagingServlet
    • sends vendor message emails
    • depends on EditGrid which contains vendor emails and message templates
  • com.eduix.jira.plugin.servlet.VendorMessagingPreviewServlet
    • creates vendor message previews
    • depends on EditGrid for message templates

Program flow related to dependencies

Workflow plugins

Basic structure of workflow plugins

Workflow components need a Factory object to create and configure the workflow function or validator and a class that contains the business logic for the actual workflow operation.

Workflow post functions

Set Customfield to first matching user group post function

Factory

com.eduix.jira.plugin.workflow.WorkflowSetMatchingGroupFunctionPluginFactory

Class

com.eduix.jira.plugin.workflow.function.SetMatchingGroupPostFunction2

Calculate total outage post function

Factory

com.eduix.jira.plugin.workflow.WorkflowCalculateTotalOutageFunctionPluginFactory

Class

com.eduix.jira.plugin.workflow.function.CalculateTotalOutagePostFunction

Autofill problem start and end post function

Factory

com.eduix.jira.plugin.workflow.WorkflowAutofillProblemStartAndEndFunctionPluginFactory

Class

com.eduix.jira.plugin.workflow.function.AutofillProblemStartAndEndPostFunction

Copy Field post function

Factory

com.eduix.jira.plugin.workflow.WorkflowCopyFieldFunctionPluginFactory

Class

com.eduix.jira.plugin.workflow.function.CopyFieldPostFunction

Auto-populate Next Action Due Date post function

Factory

com.eduix.jira.plugin.workflow.WorkflowAutoPopulateDueDateFunctionPluginFactory

Class

com.eduix.jira.plugin.workflow.function.AutoPopulateDueDatePostFunction

Fill Empty Next Action Due Date post function

Factory

com.eduix.jira.plugin.workflow.WorkflowFillEmptyDueDateFunctionPluginFactory

Class

com.eduix.jira.plugin.workflow.function.FillEmptyDueDatePostFunction

Timestamp post function

Factory

com.eduix.jira.plugin.workflow.WorkflowTimestampFunctionPluginFactory

Class

com.eduix.jira.plugin.workflow.function.TimestampPostFunction

Clear field values post function

Factory

com.eduix.jira.plugin.workflow.WorkflowClearFieldValuesFunctionPluginFactory

Class

com.eduix.jira.plugin.workflow.function.ClearFieldValuesPostFunction

Copy Updated Field Value post function

Factory

com.eduix.jira.plugin.workflow.WorkflowCopyUpdatedFieldFunctionPluginFactory

Class

com.eduix.jira.plugin.workflow.function.CopyUpdatedFieldFunction

Fire Event If Assignee Changed post function

Factory

com.eduix.jira.plugin.workflow.WorkflowFireEventIfAssigneeChangedFunctionPluginFactory

Class

com.eduix.jira.plugin.workflow.function.FireEventIfAssigneeChangedPostFunction

Workflow validators

Singular Component Validator

Factory

com.eduix.jira.plugin.workflow.WorkflowNoInputValidatorPluginFactory

Class

com.eduix.jira.plugin.workflow.validator.SingularComponentValidator

Next Action Duetime Validator

Factory

com.eduix.jira.plugin.workflow.WorkflowNextActionDuetimeValidatorPluginFactory

Class

com.eduix.jira.plugin.workflow.validator.NextActionDuetimeValidator

Problem Start/End Validator

Factory

com.eduix.jira.plugin.workflow.WorkflowProblemValidatorPluginFactory

Class

com.eduix.jira.plugin.workflow.validator.ProblemValidator

Portlets and gadgets