How to use "Due Date" in a transition rule?

Kevin H. February 21, 2022

In a next-gen project in Jira Cloud...

I have "Due Date" as a field on all issue types. I have one workflow shared by all issue types. 

I want it to work like: before transitioning from "To Do" to "In Progress," the issue must have a Due Date.

I did some research and it seems like a rule on a transition is the perfect thing. I would add a rule > "Check an issue's field" > select "Due Date" > check that its value is not empty.

However, the "Due Date" field is not available as an option, in the drop-down list of fields, when I create a transition rule like "Check an issue's field." Nor is it available on a transition rule like "Update an issue field." Why? Is there something I can do to make it available there?

And/or, is there another way to accomplish what I want?

5 answers

0 votes
Matthias Limbacher October 16, 2023

There seems to be another workaround (I'm still testing it):

  1. Create a workflow with a rule for a similar field (e.g. start date).
  2. Use REST-API POST endpoint /rest/api/3/workflows with parameters for project and issuetype (see below) to get the workflow
  3. Copy the result to a new POST body for /rest/api/3/workflows/update
  4. Find the condition with the deputy filed and exchange the id with duedate (see second example)
  5. Send request
{
"projectAndIssueTypes": [
{
"projectId": 10045,
"issueTypeId": 10041
}
]
}
[...]
"conditions": [
{
"ruleKey": "system:check-field-value",
"parameters": {
"fieldId": "customfield_10015",
"fieldValue": "[\"\"]",
"comparator": "!=",
"comparisonType": "DATE_WITHOUT_TIME"
},
"id": "a71fabe6-f05b-4da1-9c54-b014364f65da"
}
]
[...]
0 votes
Amanda Culver October 17, 2022

Hello there,

I was suffering the same problem and I've solved it by using an interim custom field (face-palm).

essentially : post funtion of 'set the interim date to %%CurrentDateTime%%' then a subsequent post funtion to 'copy the value from the interim field to 'Due date' field.

Details here : Solved: How do I automatically set the due date on transit... (atlassian.com)

Hope that helps

0 votes
Yi Xiong September 2, 2022

Hi, 

I am facing the same issue too, the Due Date is there in field however i don't see the option to choose Due Date while creating a rule in the workflow. Image attached as below.

 

Screenshot 2022-09-02 at 4.39.54 PM.png

Yi Xiong September 2, 2022

Sorry I accidentally posted it as answer

0 votes
Krista Stellar May 24, 2022

Sorry, I don't have an answer, but I have the exact same question. The above answers have been how to accomplish the requirement in the original question using the classic workflow editor. We need an answer to this question for Team-Managed projects and Jira Work Management projects that are both using the new workflow editor.

I would love a more generalized answer that provides an explanation of the limited fields that are available for the transition rules - why just the subset? Why not all the fields for the issue type(s) involved in the workflow?

I have scoured the available information to no avail.

Kevin H. May 24, 2022

Yeah! The fields Assignee, Description, Priority, Start date and Summary are all there, available to be used in a transition rule. I even have a custom field which I can also use.

But not Due Date!

And I just double-checked, and like I mentioned, I have added "Due date" as a "Context field" on all of my issue types.

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 21, 2022

Hi @Kevin H_ ,

If I understood correctly, you want to either insert a condition or a validator within a workflow. From what I know, out of the box you can use both, and due date is available as a field:

Validator:

validator000.png

validator00.png

 

Condition:

condition00.png

condition01.png

 

Condition will check for the due date BEFORE transitioning the issue, whereas validator will check the due date DURING the transition.

Travis February 23, 2022

Hi, I have the same question but for Jira Work Management. I do not have the screens shown in your reply, but would phrase my question exactly as OP has - on a Rule in Workflow Transition I can only run checks on a value, not check that the value exists. I want to ask 'is there someone assigned?' but all I can ask is 'Check if Person X is / is not assigned' etc.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 23, 2022

Hi @Travis 

Yes you can check if a value exist, like in the example below:

 

First set the condition: "assignee != ". Do not enter a value on the value field

assignee not set.png

 

Your condition should look like the following when you save it

assignee not set 02.png

Now, if you try to move a ticket (i've place the condition on the transition from open to in progress), you'll get the following message

assignee not set 03.png

Travis February 24, 2022

My screens look vastly different to those screenshots, but it does seem to work to use 'is not equal to' and leave blank. Seems like you guys still have a few usability things to tidy up in the transition from a dev platform to business platform.

Kevin H. March 14, 2022

Yeah, @Alex Koxaras _Relational_ -- I am using a next-gen project.

My understanding is that in a next-gen project, conditions and validators are "out," and workflow rules are "in."

This link describes the workflow rules I am talking about.

So, can anyone help with a workflow rule like...
Before transitioning from "To Do" to "In Progress," the issue must have a Due Date.
...?

Like Fredrik Tell likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events