I am running JIRA version 6.3.12.
When a new issue gets created, I am trying to use two separate consecutive Post Functions in my workflow to automatically create subtasks if a condition is true and assign subtask to appropriate users. I am using script post-function to create these subtasks based on what Franchise Name was selected and assign the sub-task to different users. "Franchise Name" is a custom field that is a pull-down list. When an issue is created and the script runs, what I get is regardless of what Franchise Name is selected, always 2 subtasks get created. Any help will be really appreciated.
-------------------------------------------------------------------
Here is what I have for the first post-function"
condition:
cfValues['Franchise Name']?.value == 'FRANCHISE A' || 'FRANCHISE B' || 'FRANCHISE C'
target issue type:
Sub-task
Additional issue actions:
issue.summary = ('Franchise was selected: ' + issue.summary)
issue.assigneeId = 'usernameA@email.com'
-------------------------------------------------------------------
Here is what I have for the second post-function
condition:
cfValues['Franchise Name']?.value == 'FRANCHISE AA' || 'FRANCHISE BB' || 'FRANCHISE CC'
target issue type:
Sub-task
Additional issue actions:
issue.summary = ('Franchise was selected: ' + issue.summary)
issue.assigneeId = 'usernameB@email.com'
----------------------------------------------------------------------