How can i set Due Date for Jira issue automatically with confiForms without manual entry from User?

Akhil Mamidwar September 23, 2022

I have created a confiForm in Confluence. As a result, when a form is filled out, confiForms immediately creates an issue in Jira automatically.

Query: I was to define Due Date for the generated Jira issue automatically without taking any manual entry from a 'User' for due date. The Due Date should be 2weeks after the date of form submission.

So could you help me with the solution?

Thank you!

2 answers

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 23, 2022

Hi @Akhil Mamidwar 

Welcome to Atlassian community

This page shows how to set the date for 15 days from now - https://wiki.vertuna.com/display/TEST/Using+ConfiForms+Field+Definition+Rule+to+set+the+date+to+15+days+after+the+date+the+user+has+selected And that is using the Field Definition rules

But you can also do this just in the JSON mapping that you have to create Jira issue

Having something like

"dueDate": "[entry.somedate.timestamp.add(1209600000).jiraDate]"

Where 1209600000 is 14 days in milliseconds

Alex

Akhil Mamidwar September 23, 2022

Hi @Alex Medved _ConfiForms_ 

Thank you for the answer. But I dont have any manual entry for the date (somedate). It should be the date of submission of the form. Is there any code in JSON for the same?

 

Regards

Akhil

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

You can just add the same to created field (one of metadat fields each ConfiForms record has by default)...

"dueDate": "[entry.created.timestamp.add(1209600000).jiraDate]"
Akhil Mamidwar September 25, 2022

So for doing that do I need to define a new confiForm field for created? As you have mentioned in the code "entry.created". The code 

"dueDate": "[entry.created.timestamp.add(1209600000).jiraDate]"

gives an error.

error.PNG

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 25, 2022

Do you have a due date field visible on your Jira create issue dialog?

Akhil Mamidwar September 25, 2022

When I tried with the above code, Jira issue was not created due to the error. For other issues in the project, when I update the Due date field then its visible.

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 26, 2022

OK, I will ask this again, as I am not sure I get your answer... 

When you open Create Jira issue in JIRA for this particular project and Issue type - do you see a field called "dueDate"? 

Akhil Mamidwar September 26, 2022

No I do not see it when its created, until I set a due date.

When created:

Created.PNG

When updated with a due Date:Set.PNG

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 26, 2022

So, that explains the error you see - you cannot set something into Jira issue that does not exist...

And the field must exist/be visible on the Jira issue create screen to be settable 

Alex

Like Shah study Windsor likes this
Akhil Mamidwar September 26, 2022

Thank you Alex, I am able to define due date. The error was with the code. I just replaced  "duedate" with "dueDate".

 

Regards

Akhil

Like # people like this
0 votes
Shah study Windsor December 29, 2023

@Alex Medved _ConfiForms_  How can I calculate Business Days for due date?

 

For example today is created date and due date is +3. But if I check that Sat,Sun and Mon is holiday. How can I set after 2 days? Automatically

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 29, 2023

How to know "this" (information)... automatically?

Like Shah study Windsor likes this
Shah study Windsor January 9, 2024

Sorry?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events