Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The most Most of the provided examples use some base groovy classes and utilities located in separate groovy files. Thanks to using them, our examples are less complex and show the quality details necessary in real projects. It is not required to use of them, however, you may find it them useful during while organizing your code.

Our examples are using:

ClassPackageDescription
ConfigUtilsglobal/config/ ConfigUtils.groovyAllows
to externalize
externalizing configuration in properties or groovy files
, it
. It also supports the loading of the environment-specific configuration.
FieldUtils

global/fields/ FieldUtils.groovy

Allows

to get

getting references to JIRA fields - the system and the custom ones, based on their code or id. Thanks to that, you can use constants located in enumerations like CustomFieldCode and SystemFieldId. Internally it uses ConfigUtils to externalize settings for

specify

specific custom fields ids depends on the environment.

CustomFieldCodeglobal/fields/ CustomFieldCode.groovyEnumeration for JIRA custom field codes. Thanks to that, you can track custom fields references in the scripts code.
SystemFieldIdglobal/fields/ SystemFieldId.groovy

Enumeration for JIRA system field codes. Thanks to that, you can track system fields references in the scripts code.

BaseDecisionTableWorkflowFunctionexample/decisiontable/ BaseDecisionTableWorkflowFunction.groovy

Base class supporting the implementation of workflow operations (

postfunction

post-function, validator, condition). It

provides 

provides IssueFieldOperator instance and basic exception handling and logging.

BaseFieldOperatorWorkflowFunctionexample/decisiontable/ BaseFieldOperatorWorkflowFunction.groovy

Base class which is an extension of BaseDecisionTableWorkflowFunction. It additionally provides an instance of DecisionTableManager. That class is directly used as a base class in example scripts.

BaseFieldOperatorBehaviorsexample/decisiontable/ BaseFieldOperatorBehaviors.groovy

Base class supporting the implementation of field behaviors. It

provides 

provides IssueFieldOperator instance andtheadditional helpers.

BaseDecisionTableBehaviorsexample/decisiontable/ BaseDecisionTableBehaviors.groovy

Base class which is an extension of BaseFieldOperatorBehaviors. It additionally provides an instance of DecisionTableManager. That class is directly used as a base class in example scripts.

BasicFieldBehaviorOperatorexample/decisiontable/ BasicFieldBehaviorOperator.groovy

Illustrative helper class for field operations in Script Runner Behaviors scripts. It provides

an

additional logic for a simple form fields setup.

OptionFieldBehaviorOperatorexample/decisiontable/ OptionFieldBehaviorOperator.groovy

Illustrative helper class for field operations in Script Runner Behaviors scripts

,

extends BasicFieldBehaviorOperator. It provides the simplified operations related to setting allowed options, like auto-clear selected options when users

are not allowed to see it

cannot see them or auto-select the first possible option.

Attachments

Info

If you want to use groovy superclasses and utilietiesutilities, remember to update using packages.

...