Jira channel statuses in Leverice - jira

Can I edit which icons relate to which Jira items depending on their statuses, or is this set by default once the Jira integration is set up in Leverice?

You need to set this up by using the /bindStatus command.
In the message box in your Jira channel in Leverice, type in the following command:
/showAvailableStatuses — this will provide a list of the Leverice statuses (Open, Assigned, InProgress, Done, Reopened)
Your own Jira statuses will likely be different from the above 5 Leverice statuses, so you need pick which of your Jira statuses to tie to which Leverice statuses (can tie multiple Jira statuses to a single Leverice status). This will ensure that the different event icons in your Leverice Jira integration work properly.
The syntax is as follows to tie your own Jira statuses to Leverice icon statuses [note the single quotation marks], and here are a couple examples:
/bindStatus Open “issue.status.name == ‘Your Company Jira Term For Open Item’”
/bindStatus Assigned “issue.status.name == ‘Your Company Jira Term For Assigned Item’”
etc.
Similarly, you can untie a Leverice status from a Jira status using the following syntax:
/unbindStatus Open “issue.status.name == ‘Your Company Jira Term For Open Item’”
To view a list of which status bindings you have created, use the command /showBoundStatuses
Next you can also set up automatic archiving and unarchiving of Jira channels if you want. For example, if you want the Jira item channel in Leverice to archive automatically when its Jira status is changed to Done, you use the following command:
/bindCommand /archive “issue.status.name == ‘Done’”
To unarchive automatically when status is changed from Done to something else:
/bindCommand /unarchive “issue.status.name != ‘Done’”
To untie an automatic command from a status then use the following syntax:
/unbindCommand /archive “issue.status.name == ‘Done’”
To view a list of which automatic commands you have created, use the command /showBoundCommands

Related

Using Jira Cloud with JMWE for Jira Cloud, how can I work with sub-tasks on an issue creation or transition?

I'm working on a post action on a transition. I would like to be able to get the Component/s field (a standard Jira field) from all of the Sub-tasks and then take action on them. I'm able to get a collection of the sub-tasks, but it does not appear that the Component/s field is being returned to me.
What I'm trying to do boils down to this:
On a transition from State A to State B, I want to examine the values of various fields and create Subtasks. However, I also want a transition from State B to State B to "refresh" the subtasks - if any are "missing" based on the current values of the fields, I want to create them (don't need to worry about removing any subtasks).
I can get the subtasks, if any exist from the parent, with {{ issue.fields['Sub-tasks'] }}, but {{ issue.fields['Sub-tasks'][0].components }} doesn't return the value(s) of the Component/s field on the Sub-task represented by issue.fields['Sub-tasks][0].
Is it possible to get the values of the Component/s field on the subtask using JMWE for Jira Cloud?
Ultimately, I had to reach out to support.
Due to limitations in Jira Cloud, in order to get the subtask objects on the issue, you would use:
{{ issue | subtasks }}
You can then get an array of subtasks which is complete. From here, you can iterate over and access various fields, including Component/s.

JQL to get all JIRA issues logged in between specific sprint range

I need to export all issues from Sprint 25-50. I couldn't find any filter in JIRA to do that.
Which JQL (jira query language)query I can write to do this?
Reference: https://confluence.atlassian.com/jiracore/blog/2015/07/search-jira-like-a-boss-with-jql
You can use a similar JQL as mentioned below:
project = YOUR_PROJECT_NAME and cf[11901] in("Sprint 25-50")
cf[11901] is a custom field name for Sprint, so the custom field name might be different to your JIRA instance. But you should be able to get the custom field name while typing Sprint in JQL query search box(note that your Admin should have enabled "JQL Auto-complete" feature ON).

JIRA JQL - Find issues with more than X days in Status

I want to show all issues where it has been in a current status for more than X days - is this possible?
We have this workflow: Registered => Analyze => Planned ... etc. The ticket can be in Registered for 3 weeks and it can be 3 weeks in Analyze without any problems.
Currently I am using this JQL to show tickets that have been more than 3 weeks in Analyze:
project = MyProject AND status = Analyze AND created <= -6w
This is wrong due to so many reasons and it does not look at the time in the current transition state - nor does it take in to account that it can be pushed back from Planned to Analyze and then allow a new 3 weeks analyze period.
Is the above possible to filter in JIRA? I don't have the possibility to use the JIRA REST interface - only the builtin JQL.
I am running with JIRA version 6.4.5.
You should be able to get there using the JQL CHANGED operator. Its documentation is available here.
Your query would look something like this:
project = MyProject AND status = Analyze AND status CHANGED BEFORE -3w
If you want to know for what day range the issue was lying in a status and when status are consecutive, for example a UX review will happen before QA starts working on it and I want to know the issues which are lying in UX review for more than10 days then my JQL can be
project = *your project* AND status changed to "Ux review" before startOfDay(-10) AND status changed from "UX Review" to "Ready to test" after startOfDay()
project = MyProject AND status = Analyze and not status changed during (-xd,now())
With Script Runner plugin I'd create a new scripted field that would just return the number of days since the last status change, with a Number field template, and Number Range Searcher. The
def items = com.atlassian.jira.component.ComponentAccessor.changeHistoryManager.getAllChangeItems(issue).findAll{it.field=="status"}
will return ChangeHistoryItems for Status field. Take the last one and use its getCreated() to find Timestamp. If the list is empty, it means that the issue is in the first step of the workflow, use its issue.getCreated(). Test. Re-index. Search. Use.

How to configure a custom field with auto increment value?

I have a jira workflow which going in loop, if certain transition execute as "solution failed".my problem is I need to count how many times a ticket got "solution failed".is there anyway I can achieve this?.and also this count need to be view in a ticket as well.
Initially I created a custom field and attached to relevant screens in the workflow.then after that how can I count the times that the ticket going through a certain transition.this field should be updated automatically.
With Script Runner you may create a scripted field that will just count relevant changeItems. This is example to count how many times an issue has been put into Closed status.
import com.atlassian.jira.component.ComponentAccessor
def items = ComponentAccessor.changeHistoryManager.getAllChangeItems(issue).findAll{it.field=="status" && it.getTos().iterator().next().value=="Closed"}
items.size().toString()
JIRA itself won't be able to do what you are planning. You'll have to use an addon, probably ScriptRunner or JJupin. You can use the last free release of ScriptRunner to avoid the commercial license.
More info here https://answers.atlassian.com/questions/266510/script-to-increment-value-of-custom-field-in-post-validation-condition

DateTime of sprint backlog task status change to "Done"

Is there a field in TFS or any way to get the datetime value on which a sprint backlog task was changed to done?
I spotted an AuthorizedDate field but I'm not sure if it's out of the box or not.
Suggestions will be appreciated.
It is possible to get TFS to do this for you if your template isn't already set up to do so.
Start the TFS Process editor (Install TFS power tools if needed), connect to TFS and edit the WIT Task.
Create a new field called (For Example) CompletedDate with a suitable reference name (For example: StackOverFlow.Questions.TaskCompletedDate).
Set it to be of type DateTime.
Next go to the workflow tab and do the following for each of the transitions to the done state:
Right Click, select open details
Select the fields tab, click new.
Enter the reference name of the field you create above (StackOverFlow.Questions.TaskCompletedDate).
Select the Rules Tab and click new.
Select SERVERDEFAULT from the list of rules
On the dialog that appears, set the from field to clock.
Click OK, OK, OK to get back to the workflow.
Save the Work Item Definition.
See:
https://msdn.microsoft.com/en-us/library/ms194981.aspx
When your work item is set to done the closed date and closed by fields are set automatically.
These fields are part of all of the default templates.
Some of the older 2012 & 2013 templates did not include this for tasks and you would have to adds it', however you should use the out of the box provided fields and not create new ones. If you are reporting in this it's a nightmare if each work item type had its own way of doing things. Use the System.ClosedDate and System.ClosedBy field. You can copy the setup from the PBI or Bug work items..

Resources