Is somehow possible to make workflow annotations visible in workflow for users of the issue (in picture after choosing View Workflow link near status field)?
Community moderators have prevented the ability to post new answers.
Now we use Script Field (by Script Runner plugin) with:
- detailed information about each step and
- link to picture with workflow (with included annotations)
as a workaround. That's enough for us.
Script how to display information what to do in current step in an issue:
(code is written with Groovy)
import com.atlassian.core.ofbiz.util.OFBizPropertyUtils import com.atlassian.jira.ComponentManager import com.atlassian.jira.config.ConstantsManager import org.ofbiz.core.entity.GenericValue import com.opensymphony.module.propertyset.PropertySetManager import com.opensymphony.workflow.loader.StepDescriptor import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.workflow.WorkflowManager import com.atlassian.jira.workflow.JiraWorkflow import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.issue.util.IssueChangeHolder import com.atlassian.jira.issue.util.DefaultIssueChangeHolder import com.atlassian.jira.issue.ModifiedValue ComponentManager componentManager = ComponentManager.getInstance() ConstantsManager constantsManager = componentManager.getConstantsManager() // String for property with name description. It is used for description of the current step. def String propertyName = "description" // String for property with name responsible. It is used to present who/ which role is responsible for current step. def String propertyName2 = "responsible" // Define the string which will contain final value for the Script field def String result = "" MutableIssue myIssue = issue GenericValue gv = constantsManager.getStatusByName(myIssue.getStatusObject().getName()).getGenericValue() Map ofbizArgs = [ "delegator.name" : "default", "entityName" : "IssueStatus", "entityId" : gv.get("id") as Long, ] PropertySetManager.getInstance("ofbiz", ofbizArgs, OFBizPropertyUtils.class.getClassLoader()) WorkflowManager workflowManager = componentManager.getWorkflowManager() JiraWorkflow workflow = workflowManager.getWorkflow(myIssue) StepDescriptor step = workflow.getLinkedStep(gv) def fdescription = step.getProperties()?.get("metaAttributes")?.get(propertyName) def fresponsible = step.getProperties()?.get("metaAttributes")?.get(propertyName2) //it is not possible? to have tags in steps properties so we substitute tags for special words in step descriptions result =(fdescription =~ /brxx/).replaceAll("<br>") result =(result =~ /sxx/).replaceAll("<strong>") result =(result =~ /syy/).replaceAll("</strong>") return "<div class=\'infoBox\'>" + result + "<br> <strong>Responsible:</strong> " + fresponsible + "<br> <strong>More info: </strong> your url for the documentation"+ "</div>"
hi,
Are you looking at some sort of help full descriptions for your Workflow actions?
If Yes, then when ever you add / edit the transitions, you can give description for each tranistions.
And this description will be displayed on mouse over on the Issue Worflow tranitions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We’d like to have general overview of the workflow with emphasised most important information (annotations, notes where is necessary to enter essential information or be careful, who responsibilities in some steps …).
Your proposal is not exactly what I need but it is still a possible workaround.
I also prepared Script Field (by Script Runner plugin) with detailed information about each step and link to picture with workflow (with included annotations) in meantime as a workaround.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Procedure for my current workaround using Script Field (in Script Runner plugin) with detailed information about each step and link to documentation:
1. Add description for each step in workflow:
- Move the mouse pointer over the relevant step and click the cog icon that appears to the right of the step to reveal a popup menu.
- From the popup menu, select Step Properties.
- In Property Key field insert name of the property: description.
- In Property Value enter the description of the field (e.g. Description - Paragraph 1 brxx Paragraph 2 brxx sxx text syy 2…)
2. Create custom field of field type Scripted Field and relate it with view screen of the project
3. Prepare code for Script Field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Code:
import com.atlassian.core.ofbiz.util.OFBizPropertyUtils
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.config.ConstantsManager
import org.ofbiz.core.entity.GenericValue
import com.opensymphony.module.propertyset.PropertySetManager
import com.opensymphony.workflow.loader.StepDescriptor
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.workflow.WorkflowManager
import com.atlassian.jira.workflow.JiraWorkflow
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.issue.util.IssueChangeHolder
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder
import com.atlassian.jira.issue.ModifiedValue
ComponentManager componentManager = ComponentManager.getInstance()
ConstantsManager constantsManager = componentManager.getConstantsManager()
def String propertyName = "description"
def String propertyName2 = "responsible"
MutableIssue myIssue = issue
GenericValue gv = constantsManager.getStatusByName(myIssue.getStatusObject().getName()).getGenericValue()
Map ofbizArgs = [
"delegator.name" : "default",
"entityName" : "IssueStatus",
"entityId" : gv.get("id") as Long,
]
PropertySetManager.getInstance("ofbiz", ofbizArgs, OFBizPropertyUtils.class.getClassLoader())
WorkflowManager workflowManager = componentManager.getWorkflowManager()
JiraWorkflow workflow = workflowManager.getWorkflow(myIssue)
StepDescriptor step = workflow.getLinkedStep(gv)
def fdescription = step.getProperties()?.get("metaAttributes")?.get(propertyName)
def fresponsible = step.getProperties()?.get("metaAttributes")?.get(propertyName2)
def i = 0
def String result = ""
result =(fdescription =~ /brxx/).replaceAll("<br>")
result =(result =~ /sxx/).replaceAll("<strong>")
result =(result =~ /syy/).replaceAll("</strong>")
return "<div class=\'infoBox\'>" + result + "<br> <strong>Responsible:</strong> " + fresponsible + "<br> <strong>More info: </strong> url with link"+ "</div>"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Vidic, any chance of posting the code for the scripted field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Cool thanks. I think it's important to document the workflow as much as possible within the tool.
If possible, could you edit your comment, and use the code thing, and select groovy - it will look much better. At the moment it seems like you can't edit other peoples comments.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a lot of problems to edit/create new comment (it is not possible to edit comment, preview didn't work, maximum size of the comment is 2000 characters ...) so I add code as an answer.
It looks better now :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now we use Script Field (by Script Runner plugin) with:
- detailed information about each step and
- link to picture with workflow (with included annotations)
as a workaround. That's enough for us.
Script how to display information what to do in current step in an issue:
(code is written with Groovy)
import com.atlassian.core.ofbiz.util.OFBizPropertyUtils import com.atlassian.jira.ComponentManager import com.atlassian.jira.config.ConstantsManager import org.ofbiz.core.entity.GenericValue import com.opensymphony.module.propertyset.PropertySetManager import com.opensymphony.workflow.loader.StepDescriptor import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.workflow.WorkflowManager import com.atlassian.jira.workflow.JiraWorkflow import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.issue.util.IssueChangeHolder import com.atlassian.jira.issue.util.DefaultIssueChangeHolder import com.atlassian.jira.issue.ModifiedValue ComponentManager componentManager = ComponentManager.getInstance() ConstantsManager constantsManager = componentManager.getConstantsManager() // String for property with name description. It is used for description of the current step. def String propertyName = "description" // String for property with name responsible. It is used to present who/ which role is responsible for current step. def String propertyName2 = "responsible" // Define the string which will contain final value for the Script field def String result = "" MutableIssue myIssue = issue GenericValue gv = constantsManager.getStatusByName(myIssue.getStatusObject().getName()).getGenericValue() Map ofbizArgs = [ "delegator.name" : "default", "entityName" : "IssueStatus", "entityId" : gv.get("id") as Long, ] PropertySetManager.getInstance("ofbiz", ofbizArgs, OFBizPropertyUtils.class.getClassLoader()) WorkflowManager workflowManager = componentManager.getWorkflowManager() JiraWorkflow workflow = workflowManager.getWorkflow(myIssue) StepDescriptor step = workflow.getLinkedStep(gv) def fdescription = step.getProperties()?.get("metaAttributes")?.get(propertyName) def fresponsible = step.getProperties()?.get("metaAttributes")?.get(propertyName2) //it is not possible? to have tags in steps properties so we substitute tags for special words in step descriptions result =(fdescription =~ /brxx/).replaceAll("<br>") result =(result =~ /sxx/).replaceAll("<strong>") result =(result =~ /syy/).replaceAll("</strong>") return "<div class=\'infoBox\'>" + result + "<br> <strong>Responsible:</strong> " + fresponsible + "<br> <strong>More info: </strong> your url for the documentation"+ "</div>"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.