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,365,265
Community Members
 
Community Events
168
Community Groups

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

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!

1 answer

1 accepted

0 votes
Answer accepted

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

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

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]"

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

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

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.

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"? 

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

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

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

 

Regards

Akhil

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events