Hi @Руслан ,
your code is ok but after doing that you need to update issueitself through https://docs.atlassian.com/software/jira/docs/api/8.0.1/index.html?com/atlassian/jira/issue/IssueManager.html (updteIssue method)
Hope this helps,
Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...