Search jira issues with open subtasks - jira

We currently handle the progress of our tasks solely by using subtaks under each issue. For this reason, I would like to create a filter that only displays those issues that have at least one subtask that is stil open.

You can use Script Runner plugin (older versions are free) with this JQL:
issueFunction in parentsOf("issuetype in ('Sub-Task') and statusCategory != Complete")
You'll need to state all possible sub task types for issuetype.

Would something like this work as a filter?
project=PROJECTNAME AND issueType in subTaskIssueTypes() AND status ="To Do (or Open or whatever you are using)"
This should pull all issues that are in the sub task group (Sub-task, Sub-bug, etc.), that are in your current project and that have the desired status (Either the one you are looking for, or you could switch it to exclude the statuses you do not need like "Done").

Related

JQL: Hide `Done` sub-tasks when their parent moved to `Done`

Sometimes tasks have lots of sub-tasks, and it is perfectly OK for them being on the board during work on them. With time sub-tasks will be resolved to Done column. And as soon as parent task is also finished and moved to Done - there is no sense to keep and show all its subtasks there.
Please help with JQL filter to hide sub-tasks from Done column if/when their parent is moved to Done. Basically, it's like collapsing subtasks underneath parent.
I've tried smth like
issuetype = Sub-task AND issueFunction in portfolioChildrenOf("Status = Done")
but with no success
This should do the trick:
project = PROJECT and type in standardIssueTypes() and status = Done and not (issueFunction in parentsOf("project = PROJECT and type in subtaskIssueTypes() and status = Done"))
Note that it will also remove completed issues without subtasks.

TFS build custom conditions for running a task - check if specific previous task has failed

TFS build allows to specify conditions for running a task: reference.
The condition I would like to define is: a specific task [addressed by name or other mean] has failed.
This is similar to Only when a previous task has failed, but I want to specify which previous task that is.
Looking at the examples I don't see any condition that is addressing a specific task outcome, only the entire build status.
Is it possible? any workaround to achieve this?
It doesn't seem like there's an out-of-the-box solution for this requirement, but I can come up with (an ugly :)) workaround.
Suppose your specific task (the one you examine in regards to its status) is called A. The goal is to call another build task (let's say B) only in case A fails.
You can do the following:
Define a custom build variable, call it task.A.status and set to success
Create another build task, e.g. C and schedule it right after A; condition it to only run if A fails - there's a standard condition for that
The task C should only do one thing - set task.A.status build variable to 'failure' (like this, if we are talking PowerShell: Write-Host "##vso[task.setvariable variable=task.A.status]failure")
Finally, the task B is scheduled sometime after C and is conditioned to run in case task.A.status equals failure, like this: eq(variables['task.A.status'], 'failure')
I might be incorrect in syntax details, but you should get the general idea. Hope it helps.

Workflow to apply scripts in homologation/production

I'm using TFS's workitens to DBA's team apply scripts in homologation/production, so, i'm creating a workitem and linking BD's scripts in it. To make sure that nobody will change the script after i created the workitem, the DBAs team is locking the scripts in TFS before aplly. I think there is another tool or method to make it safer and smarter
You can give a try with this workaround by Angela Dugan, In short the solution of Angela works as follows:
Add a field [UserAccessDenied] to a work item but do not show this
on the form In the desired state add a rule [REQUIRED] for a certain
group
Because you can not enter a value, you can never save the work item,
so it is “sort of” read only.
For example, after setting only you in can make a state transition from [Active] to [Resolved]

Localize workflow task title in alfresco activiti

I followed this tutorial to create a custom alfresco activiti workflow: http://ecmarchitect.com/alfresco-developer-series-tutorials/workflow/tutorial/tutorial.html
I tried to externalize the contained strings by creating .properties files and made them known in the xyz-context.xml. While this is working I face a problem with changing the title of a worfklow task.
I use the following sampleWorkflow.properties file:
sampleWf.task.confirmTask.title=Confirm this, with a title which is different than the task name
sampleWf.task.confirmTask.description=Confirm please
The bpmn-snippet for this tasks, is configured like this:
<userTask id="confirmTask" name="Confirm" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="samplewf:customTypeTask"></userTask>
My question is
Why only the description of the workflow tasks change, but not the title?
The above localization works, when I don't use the task ID but it's property like this:
sampleWf.task.samplewf_customTypeTask.title=This changes the title
If this the only possibility I'd need to deploy a lot of custom types just for naming purposes. Can't I reuse types across workflows and just change the title (name) by this configuration?
Please refer to this link in order to have a better idea on how strings could be localized in a workflow in Alfresco :
<workflow_prefix>_<workflow_name>.workflow.[title|description]
<workflow_prefix>_<workflow_name>.node.<node_name>.[title|description]
<workflow_prefix>_<workflow_name>.node.<node_name>.transition.<transition_name>.[title|description]
<workflow_prefix>_<workflow_name>.task.<task_prefix>_<task_name>.[title|description]
where:
<workflow_prefix> is the workflow model namespace prefix
<workflow_name> is the workflow name
<node_name> is the name of a node within the workflow
<transition_name> is the name of a node transition within the workflow
<task_prefix> is the task namespace prefix
<task_name> is the task name
<transition_name> is the workflow transition name
Which suggests you should be putting something like :
sampleWf_<workflow-name>.task.sampleWf_confirmTask.title=Confirm this, with a title which is different than the task name
Which -in theory- should give you the possibility of using the same task model in multiple workflows with different localization, but I guess you still have to duplicate your model in order to be able to have multiple localizations in the same workflow!
Update :
Oops! I got tricked by this statement:
This page was last modified on 13 March 2015, at 02:22.
That was a bot marking the page as obsolete!
The page is obviously outdated and it is talking about jbpm, not activiti, hopefully you still can use the same naming conventions!
Otherwise, worst case scenario, you got to create new task models that basically just extend your original task model to be able to customize the task title as needed (No need to redefine properties/constraints ...).

How to "order" tasks in TFS

I'm relatively new to TFS and I've been trying to figure out how to order tasks as follows.
Task 1
Task 2 (requires that Task 1 be completed first)
Task 3 (requires that Task 1 and Task 2 be completed first)
etc
Is there a way to do this? We are using TFS 2010.
Well.. I found it.
You can specify that a task is a "Predecessor" or a "Successor" to another task, or multiple tasks when you define the link between the two.
There is some basic info about it at this location: http://msdn.microsoft.com/en-us/gg465266
It looks like the tasks are ordered by Backlog Priority then ID. By default the backlog priority is blank and is not available to be updated in the UI for tasks.
You can add the field into the UI by modifying the process template.
I found the easiest way to manage these is to create a view that includes the backlog priority, open it in excel and manage them from there.
As the OP has stated, you can use the "Predecessor" or "Successor" links. However, if you're just looking to set the order of the tasks and keep them as a "Child" of the parent User Story:
Run the query in TFS > Open in Microsoft Office > Open in Excel
In Excel, show the "Stack Rank" column. The user story will have a stack rank value, but the tasks will not.
Set the stack rank for the tasks for each user story.
Click the publish button in Excel.
Re-run the query in TFS and the tasks should now be ordered (assuming you have ordered by stack rank).

Resources