OBJECTIVE
Make "Time Spent" field required during transition from one state to another if Customer is ABC
SETUP
System = Download JIRA (v6.0.1#6096-sha1:e4a48bd)
"Time Spent" field info according to https://<my_jira_instance>/rest/api/2/field
{
"id": "timespent",
"name": "Time Spent",
"custom": false,
"orderable": false,
"navigable": true,
"searchable": false,
"schema": {
"type": "number",
"system": "timespent"
}
},
SYMPTOM #1 - Behaviour plug-in
- Created behaviour and added "Time Spent" field
- Added the following script:
log.warn ("Time Spent, please talk to me!" + getFieldChanged())
- Added condition for action (transition)
No "Time Spent" info in the atlassian-jira.log. Works for other system and custom fields.
SYMPTOM #2 - JIRA Workflow Transition
Transition Screen: during transition, enter or change values in any system or custom field without clicking OK - AJAX evnets are sent to server (according to atlassian-jira.log)
"Time Spent" - enter any value - NO events are sent to server
SYMPTOM #3 - JIRA Workflow Post Function
- Created my own "ABC Time Tracking" custom field and added it to the transition screen.
- Create -> Workflow -> View Post Functions
- Selct "Copy Value From Other Field"
- Source Field = "ABC Time Tracking"
- Destination Field = <not on the list>. The sum Time Spent doesn't count.
Please help and thanks in advance!