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,366,099
Community Members
 
Community Events
168
Community Groups

Take a date from a ticket summary and apply to Due Date

Hello,


We have a form for new starters that comes into on prem jira.  

In the summary of the ticket the start date is populated by the form.

Is there a way using automation to take that date and populate the Due Date field please?


Many thanks in advance,
Mark

1 answer

1 accepted

1 vote
Answer accepted

Hi @Mark Cartwright 

Do you have automation for Jira installed in your instance?  If so, you should be able to parse out the date from the summary and use it to see the Due Date.

If not, there is a free (lite) and paid (pro) version of the automation rules, and you could discuss with your site admin about adding the feature.

Kind regards,
Bill

Hi Bill,

Thanks for the quick response.

We do have automation for jira installed and that's what I'm hoping to use but I have no idea how to parse the date out from the summary.

Can you advise or point me to info on how to do that please?

Kind regards,
Mark

Mark, I can try to do both! 

If you provide examples of your summary, the community can give you ideas how to parse that with a rule.

Next, here are links to the server documentation for automation rules, the template library of rules, and a large list of automation references:

Bill, thanks again for the response!

Unfortunately not been able to find what I need from the documentation you kindly gave me so here's the example of what I'd like to do.

The Summary of the ticket will always be in the same format as it's created by a mail sent via Power Automate.  The summary looks like this:

New Hire Form for *user's name* - *universal date format*

For example:

New Hire Form for Joe Bloggs - 2021-10-15

 

What I'd then like to do is use automation for jira to look at each newly created ticket, take that universal date and populate the Due Date field with it.

 

Would love to know how please.


Many thanks,
Mark

Mark, you should be able to extract that date using the right() function:

https://confluence.atlassian.com/automation/text-functions-993924863.html#Textfunctions-rightright(intlength)

For example with your summary layout:

{{issue.summary.right(10).toDate}}

The rest of the rule would be something like:

  • trigger: issue created
  • condition: ??? you probably want some type of condition here to limit which issues get processed.  Otherwise everything created in the project will try to do this.  Perhaps check that the {{initiator}} is who you expect to create the issue.
  • action: edit the Due date to equal the smart value from above
Like # people like this

Thank you so much Bill, that works perfectly!

Like Bill Sheboy likes this

Awesome!  I am glad to learn that helped.

Hello,

first thank you for the great work!

I have a similar problem, which can also be solved with the solution described. Unfortunately our date is in a different format. I have read that you can change the date format, but everything I tried so far failed. What should the query look like if the format from the date in the summary is not 2022-01-21 but 21.01.2022?

kind regards
Hannes

Hi @Hannes 

My suggestion would be to use text functions to parse/convert the string into the standard Jira date format of yyyy-mm-dd and then use toDate on the result.

If you are using Jira Cloud with your automation rule, Create Variable would help for a working space location.  For example, if we assume your date of dd.mm.yyyy format is in the summary, put this in a created variable, such as named varMyDate:

{{issue.summary.substring(7,10)}}-{{issue.summary.substring(4,5)}}-{{issue.summary.substring(1,2)}}

Then use the date with:

{{varMyDate.toDate}}

Kind regards,
Bill

Hello @Bill Sheboy ,

I am able to grab date from the summary "Employee Termination Billy Bolton 2022-02-10,

 

Now If the ticket is unresolved before 2pm on the due date, I need to send notification to slack channels and some email address.

I know the integration of jira cloud with slack and email process.

Can you please tell me the logic on how to find before 2pm on due date?

So that afterwards I will include if the issue is not closed:

send notification.

I am stuck with the time logic. Please help me with that. Thanks in advance

Hi @Harish ShanmugamDhanasekar 

You can probably do that with the date time functions: resetting to start of day, adjusting the time with plusHours(), adjusting to your time zone, and the perform the check against {{now}} adjusted to your time zone.

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

I recommending starting with just writing to the audit log with a manually executed rule to get the syntax correct, and then add the condition to your production rule.

Kind regards,
Bill

Hello @Bill Sheboy ,

I am able to grab the due date from the suggestion given by Darryl Lee.

But I want to run the trigger only at 2 pm on the last working day instead of running it daily at 2pm. Please help me with this.

https://community.atlassian.com/t5/Jira-questions/How-to-extract-date-from-the-Summary-Field-in-Jira/qaq-p/1946675#M519371 

 

Thanks,

Harish.

Thanks for that link...As Darryl is actively helping to solve that with you, let's stick with that thread, and I'll post my thoughts there.

Kind regards,
Bill

Thanks a ton for your help @Bill Sheboy 

 

Kind Regards,

Harish

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events