Forums

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

Need a Pop Up screen When the Transition button Executed In the Issue

Kumar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2018

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

 

3 answers

0 votes
Christian Fabila March 4, 2019

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

Kumar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 4, 2019

HI @Christian Fabila  Here are the 3 Options that I have in "Validators".

 

 Permission ValidatorValidates that the user has a permission.
 Script Validator [ScriptRunner]Runs a script to check validation, or a built-in script.
 User Permission ValidatorValidates that the user has a permission, where the OSWorkflow variable holding the username is configurable. Obsolete.

 

 

Thanks,

Kumar

Christian Fabila March 4, 2019

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

Kumar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 4, 2019

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 

0 votes
Raynard Rhodes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2018

1.png 2.png 3.png  

Raynard Rhodes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2018

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.

Kumar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2018

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

Raynard Rhodes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2018
Kumar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2018

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

Raynard Rhodes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2018

Ah, we do not use scriptrunner. I’m sure there are others that can assist further.

0 votes
Raynard Rhodes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2018
Kumar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2018

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

Warning.PNG

I hope you understand What i'm asking if you wont please ask me again 

Thanks,

Kumar

Raynard Rhodes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2018

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.

Kumar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2018

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 warning 2.PNG

The parent ticket has to stay in that status only.

Can you please help me how to achieve this.

 

Thanks,

Kumar

Alexandru Magiaru
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 8, 2024

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

😉

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

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 now
AUG Leaders

Atlassian Community Events