JQL Find Blockers of Blockers - jira

In my company, we have, amongst others, two link types: BLOCKS and IS BLOCKED BY. We also have a status of IMPEDED.
Let’s say there are three issues: Issue A, Issue B, and Issue C :
Issue A - status is IMPEDED, is linked to Issue B with a link type of IS BLOCKED BY.
Issue B - Status is IMPEDED, is linked to Issue A with a link type BLOCKS and is linked to Issue C with a link type IS BLOCKED BY.
Issue C - status is READY, has a link to Issue B with a link type BLOCKS.
So basically, we can’t work on A until B is finished. And we can’t work on B until C is finished. So we have to finish issue C first.
I want to be able to run a JQL query that will return issue C. In other words, I want to find issues that are blockers to issues that block other issues.
This is very similar to a depth first search on a tree. Problem is that I have no idea how to do that in JQL.
Does anybody have any ideas?

I successfully used such filters to identify tickets that are blockers for other but are not blocked themselves:
project=YourProject and status!=READY and issue in linkedIssuesFromQuery("project=YourProject", BLOCKER, inward) and issue not in linkedIssuesFromQuery("project=YourProject and status!=READY", BLOCKER, outward)
First part
project=YourProject and status!=READY
simply finds unresolved tickets.
Next part:
issue in linkedIssuesFromQuery("project=YourProject", BLOCKER, inward)
filters for tickets being in inward relation of type BLOCKER so the ones that block other tickets.
Finally last part:
issue not in linkedIssuesFromQuery("project=YourProject and status!=READY", BLOCKER, outward)
filters for tickets not being blocked by unresolved (not READY) tickets (outward relation BLOCKER).

Related

Can I set up a Google Sheet to copy everything from another sheet, except for cells with a specific word count?

I have a Google Form set up, and anybody can submit a response an unlimited number of times. (It has to be this way. I can't make people log in.)
The issue is that there's a spammer who's using some website or bot to submit thousands of spam responses. I've tried using the captcha add-on from xfanatical (which adds a question that makes them fill out a particular code, which changes every minute), but the spammer figured out how to get past that.
One thing I've noticed, though, is that each spam submission is exactly 100 words. So one way I can think of to solve this is to have a sheet that returns all rows from the "Responses" sheet except for the rows where the submission is exactly 100 words.
Edit: I've also noticed that all the submissions start with a space, so that could be used too.
Let's say that your Responses 1 sheet has the answers in columns A, B, C, D, E etc. all the way to column Z
Let us now suppose that it is column C that holds the answers that start with a space.
Follow these steps:
Please create another tab and name it Clean.
Place the following formula in another cell A1
=QUERY('Clean'!A1:Z,"select * where not C matches '\s.*'")
Enjoy a spam free answer sheet :)
As mentioned by the OP, one can also use
=QUERY('Responses 1'!A1:Z,"select * where not C starts with ' '")
Functions used:
QUERY

Jira - JQL Get all issues that are linked with any of my subtasks

Let's say that I have 3 issues: A, B (which is a subtask of A) and C, which is linked with B and isn't a subtask of A.
Now, being in issue A (current issue), I would like to do a JQL query to get all issues that are linked with any of my subtasks, and in this case it should give me C, as C is linked with B, which is a subtask of the current issue, A.
It would be nice if I could specify the issue link name and issue type of subtask.
I can use scriptrunner JQL and I tried using it but I still couldn't figure it.

Unexpected results appear when using time filters instead of sprint (during, before, after)

So I have these 3 filters that seem to work if I use sprint = ###, it's a total issues, open issues, and a closed issues. And the open and closed issues always add up to the total.
But when I try the same thing using during (which I need to use to get a graphing plugin to work) I get some unexpected results.
So for example this version of my filter will return 11 results:
Project = EX AND assignee was example.user DURING ('2018/02/07', '2018/03/05')
But the filter for open issues is returning 6 results.
Project = EX AND assignee was example.user AND status was not in (DONE, CLOSED) DURING ('2018/02/07', '2018/03/05')
But closed only gets 2:
Project = EX AND assignee was example.user AND status was in (DONE, CLOSED) DURING ('2018/02/07', '2018/03/05')
So instead of it matching the total, open and closed issues only add up to 8 of what should be 11. Even more confusing is on some periods the graphing tool gets more open issues than it gets total issues.
Note:
It also does it if I use DURING (endOfDay(-11),endOfDay(3)) or `after "2018/02/07" before "2018/03/05". But really I need it to work with some sort of during due to the tool I'm trying to integrate.
Your DURING statement only applies to the last statement made before it.
Meaning that in your first filter you search for issues that were assigned to your example.user during that period.
In the second filter you search for issues that were ever assigned to your example.user and were in the statuses you specify in the period in the DURING statement. So the during will only check the status, not the assignee.
Same goes for the thrid statement.
Hope this helps

Google sheets can't identify a duplicate for a pasted link

in order to check if there are duplicate copy+pasted links in a column, I have this formula:
=if(counta(unique(A:A))<>counta(A:A), "Yes, there is a duplicate", "No duplicate")
It works fine for everything except copy+pasted links. When it comes to links, it doesn't count the first duplicate. so if I have as an example,if I pasted
"http://techinfo.honda.com/rjanisis/pubs/OM/AH/A2A154DOM/enu/A2A154DOM.pdf"
in column A twice, it doesn't register. It only works when I have a triplicate, then it senses that there's another duplicate in the column (when in fact, now there's 3 of the same link).
Any workaround? Is this an intended function..? I'm guessing this has something to do with the =unique() formula not registering the duplicate..
Extremely odd. I can't see it being intentional. I suspect more to do with updating than unique. A possible (but if so very ugly indeed) workaround seems to be to force a "Yes, there is a duplicate" response (say z in two cells in ColumnA) before removing the two zs and relying on the formula's veracity.

Jira bugs summary per a user story

I'm looking for an idea how to improve visibility of user stories progress in Jira+GreenHopper.
How we work now: we put all our User Stories into Jira, break them down into sub-tasks for development, then our testers link bugs in Jira to appropriate user stories. On our project dashboard we have a filter like "show name, status, completion % where fixVersion = current_sprint order by priority desc".
Our problem: in order to understand if a user story marked as 100% done can really be demonstrated to our customer, we need to make sure if it has no critical bugs and has no more than N low-priority bugs. But now we need to manually go over each user story one by one to calculate such figures.
Question: Any ideas if it's possible to show bugs count of each priority in the list of user stories in current sprint? For simplicity, we would consider like:
High: not resolved bugs of Blocker + Critical priority;
Medium: not resolved bugs of Major + Medium priority;
Low: not resolved bugs of Minor + Trivial priority;
So, such list would look like
US name | US completion % | High-pri bugs # | Med-pri bugs # | Low-pri bugs #
Ideas of the easiest way? anything built on standard Jira gadgets/queries? or any custom plugin you might know to use for that? or even if anything should be developed? Thanks!
Create a new issue type, may be call it "Sub-Bug". This issue type should be available only when user tries to create subtask under a story.
When QA validates a story and finds the issues, ask them to create sub-task under the story and select "Sub-bug" as issue type.
Now you can easily follow that all subtasks (which includes actual subtask and su-bug) are completed before you move story to "Done" status.
You could use a (read only) custom field which stores the number of all linked issues. This custom field can be shown in your search results.
Maybe this is something for you: JIRA Misc Custom Fields
This custom field can be used easily in filters. The issue count can than be displayed in e.g. confluence pages. That confluence page you can show to your customers.

Resources