Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,557,772
Community Members
 
Community Events
184
Community Groups

Is there a way to check on an issue's status using the haslink function

Ishan Banerjee
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!
Apr 21, 2023

For any Jira that is blocked by another team's Jira , we are using the haslink function and if the linked JIra is "is blocked by" then based on the status of the blocker Jira we would like to show our Jira to be as BLOCKED. 

So if the blocker Jira is in Open, In progress , in review etc state then it is still BLOCKING but once the blocking Jira has been CLOSED or RESOVLED then the blocker is considered as not a blocker however team doesn't want to just remove the issuelink as it will be used for references.

 

 something like this : 

project = "PXYZ" AND (issueFunction in hasLinks("is blocked by") AND issuelinkstatus not in (Closed, Resolved))

 

3 answers

1 vote
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 24, 2023

Hello @Ishan Banerjee 

Welcome to the Atlassian community!

Are you working with Jira Cloud or Jira Server/Data Center?

Do you have any third party apps that extend JQL functionality, like Adaptavist ScriptRunner or JQL Tricks?

1 vote
Dan Breyen
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.
Apr 24, 2023

Hi @Ishan Banerjee welcome!  You don't say whether or not you are on the Cloud with your system or not.  If you are on the Cloud, you should be able to accomplish this with Automation.  I'm no expert on it, but in your project with the child (linked) issue, you should be able to see when the status changes and then update the Parent Status accordingly.  

0 votes
Taranjeet Singh
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 25, 2023

@Ishan Banerjee From your example JQL query, it seems that you are already using ScriptRunner for Jira add-on (since you have used the keyword "issueFunction" and the JQL function "hasLinks()", which are normally used in ScriptRunner).

Based on my knowledge of ScriptRunner, I think in your case, "linkedIssuesOf()" function will suit your needs since this function supports a JQL subquery and a link description as parameters. You can read more about the usage of this function in ScriptRunner add-on's documentation and use it to see it it solves your problem. It would be roughly like this:

project = "blocked-project-name" AND issueFunction in linkedIssuesOf("project = 'blocking-project-name' and status not in (Closed, Resolved)", "blocks") order by created DESC

Hope this helps!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events