Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is it possible to make linked issue required when create special issue type?

Is it possible to make linked issue required when create issue type = test? you should link it to any story or to any other issue type. And you could choose only one special type of link (tests, tested by)?

3 answers

1 accepted

0 votes
Answer accepted

Using JMWE, you can add a Related Issues Validator on the Create transition with the following options:

  • Mode: "Require the creation of issue links on the transition screen"
  • Issue Link: the link type to require
  • Valditator Scope: check the Conditional Validation checkbox and use a script to apply the validator only to Test issues:
issue.get("issuetype").name == "Test"

Thank you! Its perfectly works!!

@David Fischer _Innovalog_ Hello =)
could you help me please write in Groovy 
Estimate Development != "0" and != "EMPTY"
I use it in Field Required Validator in work flow, when transit the issue) 

and may be any docs where I can learn and practice it )

issue.get("customfield_10803") is not null or empty 
this is not working

Assuming customfield_10803 is the Estimate Development field, you can do this:

!!issue.get("customfield_10803")

@David Fischer _Innovalog_  but how it should be condition value of this field shouldn't`t be empty or shouldn't`t be "0"?

If customfield_10803 is a Number custom field, what I provided will work (zero is considered as "falsy"). If customfield_10803 is a Text field, then you need:

!!issue.get("customfield_10803") && issue.getAsString("customfield_10803") != "0"

If you have scriptrunner, you can use behaviours

In the initializers you can put something like this:

import com.atlassian.jira.issue.link.IssueLinkTypeManager
import com.atlassian.jira.component.ComponentAccessor

if (getActionName().equals("Create")){
def linkType = getFieldById("issuelinks-linktype")
linkType.setFormValue("blocks")
def entry = ComponentAccessor.getComponent(IssueLinkTypeManager).getIssueLinkTypesByName("B locks").collectEntries {it -> [it.outward,it.outward]}
def entry2 = ComponentAccessor.getComponent(IssueLinkTypeManager).getIssueLinkTypesByName("B locks").collectEntries {it -> [it.inward,it.inward]}
entry.putAll(entry2)
linkType.setFieldOptions(entry)
}


0 votes

You forgot to mention which app you're using, and whether you're on Server or Cloud. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

New Cloud Apps Roundup - Spring 2021

Atlassian's marketplace partners have had a very productive start to 2021! Since our last roundup, our developer community has added over 160 new cloud apps to the Atlassian Marketplace to help you...

232 views 3 20
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you