HI Team,
In One of my workflow transition I gave a condition like Until unless when the sub-task close only the parent issue transition have to execute if the sub-task in progress the parent issue transition button has to hide.
Here I need instead of hiding the transition button of parent issue when the user execute that transition button a pop up message has to appear and it has to say like "The sub-task need to close"
example:
I created a parent issue In one particular status I created a sub-task so I gave a above condition like if i did not close the sub-task the parent issue cant close .
The above condition which i gave Its hiding the close transition when i close the sub-task then only its appearing
Here I dont want to hide the transition I want that close transition has to show on issue but that function wants to disable. When any user execute that transition its has to say "Need to close the sub-task" like a warning popup screen.
Can any one suggest me how to do this please is there any chance that i can do with script runner if it is can you provide me the script please.
Thanks,
Kumar
Hi @Kumar
Now I having the same problem, I only can see 2 opción of validator. Could you help me? What were you do to see the other options?
Thank you
HI @Christian Fabila Here are the 3 Options that I have in "Validators".
Permission Validator | Validates that the user has a permission. | |
Script Validator [ScriptRunner] | Runs a script to check validation, or a built-in script. | |
User Permission Validator | Validates that the user has a permission, where the OSWorkflow variable holding the username is configurable. Obsolete. |
Thanks,
Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kumar
So, you continue today with this problem?
I asked you because I have the same problem now, and I need to resolve it.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Christian Fabila If you have "Jira Workflow Toolbox" Add-on as @Raynard Rhodes suggested above using Validations it will work i have not tried that.
Thanks,
Kumar
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.
If you follow those screenshots (assuming you have Jira Workflow Toolbox) you will be able to set the conditions that need to be met.
You can choose the status or resolution the subtask need to be in for the parent issue to transition. You can even filter it based on the value of a [custom] field. Give it a try and see what happens.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI @Raynard Rhodes Thanks for your response
When I click on Validator I'm seeing only 3 options and for more options like you have in screen short Which add-on are you using ?? is that a paid add-on or free app??
can you tell me the name of that add-on
Thanks,
Kumar
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.
Hi @Raynard Rhodes Thanks for giving suggestion.
I have seen a document that provided in the scriptrunner documentation can you please help me in modifying the script
https://scriptrunner.adaptavist.com/5.4.43/jira/recipes/scriptfields/informationMessage.html
and the script is
import com.atlassian.jira.ComponentManager
import groovy.xml.MarkupBuilder
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.ManagerFactory
import com.atlassian.jira.config.properties.APKeys
def componentManager = ComponentManager.getInstance()
def issueLinkManager = componentManager.getIssueLinkManager()
def baseUrl = ManagerFactory.getApplicationProperties().getString(APKeys.JIRA_BASEURL)
def List<Issue> blockingIssues = []
issueLinkManager.getOutwardLinks(issue.id).each {issueLink ->
if (issueLink.issueLinkType.name == "Remediation Sub-task") {
def linkedIssue = issueLink.destinationObject
if (!linkedIssue.assigneeId && !linkedIssue.resolution) {
blockingIssues.add(linkedIssue)
}
}
}
if (blockingIssues) {
StringWriter writer = new StringWriter()
MarkupBuilder builder = new MarkupBuilder(writer)
builder.div (class:"aui-message error shadowed") {
p (class: "title") {
span (class: "aui-icon icon-error", "")
strong ("The Related Subtask Need To Close:")
}
ul {
blockingIssues.each {anIssue ->
li {
a(href:"$baseUrl/browse/${anIssue.key}", anIssue.key)
i(": ${anIssue.summary} (${anIssue.statusObject.name})")
}
}
}
}
return writer
}
else {
return null
}
I have tried by selecting the "Built in script Field" In that i selected Custom script but the i got error in the script
Can you please look into the document and could you explain me how to do this
Thansk,
Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, we do not use scriptrunner. I’m sure there are others that can assist further.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This may be able to help you
https://community.atlassian.com/t5/Jira-questions/How-to-add-a-pop-up-screen/qaq-p/209077
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI @Raynard Rhodes Thanks For your response the link you provided is different story .
I need The condition which i gave the transition is hiding I'm wondering is there any chance to Instead of hide the transition by applying the condition . I need like below Warning screen and it has to say like "need to close the sub-task". and that close transition has function has to disable
I hope you understand What i'm asking if you wont please ask me again
Thanks,
Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, o.k. You want to use a Validator instead of Condition. Conditions will hide the button with no indication of what needs to happen before it can be shown. Validators will pop-up a message with the default dialogue then the dialogue you choose.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Raynard Rhodes Thanks for your reply
So, Here the condition has to work and instead hiding the button when any user click the "Close" button if the sub-task is still open a pop-up dialog box has to appear .
like this
The parent ticket has to stay in that status only.
Can you please help me how to achieve this.
Thanks,
Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kumar,
you can add a transition screen and a message box custom field on that transition screen,
where the default value in it's context can be the text you want to add.
Look at this for further tips:
Info, Tip, Note, and Warning Macros
😉
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.
Register nowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.