Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Release automation with rich text

Pablo Botas
Contributor
November 6, 2023

Hi experts! We are sending automatic Slack messages when a new version is released with something similar to this:

Hi team!! New version <https://company.atlassian.net/projects/XXX/versions/{{version}}/tab/release-report-all-issues|{{version.name}}> was released on {{version.releaseDate.mediumDate}}. Nice work!

Release description: {{version.description}}

Please, ask any questions in this thread :point_down:

However, now there is a rich text field replacing the description as the main description of the release in the UI. How could we use data in that field? See the following image for clarity

Screenshot 2023-11-06 at 23.09.48.png

1 answer

1 accepted

0 votes
Answer accepted
Gezim Shehu [Communardo]
Community Champion
November 5, 2018

The method I use to get the action id is

 

import com.opensymphony.workflow.loader.ActionDescriptor
import com.atlassian.jira.workflow.WorkflowTransitionUtil
import com.atlassian.jira.workflow.WorkflowTransitionUtilImpl
import com.atlassian.jira.workflow.IssueWorkflowManager
...

WorkflowTransitionUtil workflowTransitionUtil = (WorkflowTransitionUtil) JiraUtils.loadComponent(WorkflowTransitionUtilImpl.class);
IssueWorkflowManager issueWflwMan = ComponentManager.getComponentInstanceOfType(IssueWorkflowManager.class);

....

int actionID
def actionName = "Cancelled" //transition name

Collection<ActionDescriptor> coll = issueWflwMan.getAvailableActions(subtaskIssue, user);
        for(ActionDescriptor ad : coll) {
            if(ad.getName().equals(actionName)) {
                actionID = ad.getId();
            }
        }
liansheng zhang
November 6, 2018

great! thank you very much!

Gezim Shehu [Communardo]
Community Champion
November 6, 2018

Glad to help

Suggest an answer

Log in or Sign up to answer