Confluence has been updated to ver 6.15.9. In case of any troubles, please contact infra team.

Jira Cloud, issue type updating not working

 
1
0
-1

I'm having trouble updating Issue's type via Exalate. The typename updates nicely but it doesn't actually update the type of the issue.



def statusMapping = [

// Jira issue status <-> Zendesk ticket status
"bug" : "Bug",
"feature_request" : "Story",
"task" : "Task",
"technical_issue" : "Task"
]

def TicketTypeName = replica.customFields."Ticket type"?.value?.value
//throw new Exception("Status - ${TicketTypeName}")
def TicketType = statusMapping[TicketTypeName] ?: "Bug"
//throw new Exception("Status - ${TicketType}")
//issue.typeName = nodeHelper.getIssueType(TicketType)?.name ?: "Bug"
issue.typeName = nodeHelper.getIssueType(TicketType)?.name ?: "Bug"
issue.type.name = issue.typeName
throw new Exception("Status - ${issue.type.properties}")



The exception shows the type name updates to Task as it should but the issue itself is still the original type in Jira.



Script error for issue PCO-2613. Details: Status - [class:class com.exalate.basic.domain.hubobject.v1.BasicHubIssueType, id:10167, locked:false, description:null, name:Task]. Error line: Script334.groovy:33

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi!

      Actually we are limited here by the Jira Cloud rest API which doesn't allow to move issues. There is an Atlassian feature request:

      https://jira.atlassian.com/browse/JRACLOUD-70305?error=login_required&error_description=Login+required&state=a3ffdee2-9aed-4b60-bb18-d3de8ace6bce


      Still I have seen it's possible to move to other types with the script you are using, but only if the issue types shared the same workflow.


      Best regards,

      Juan

        CommentAdd your comment...