Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Want to Copy date time picker field time value and set the date to current date

Muhammad Moazzam Hassan
Contributor
March 1, 2023

Hi,

I am cloning issues on a daily at 12:00 Am and have a date time field name Schedule Date Time Field, what I want is to copy the value of time from the source issue and set the date to the current date. 

1 answer

1 accepted

0 votes
Answer accepted
Jerryton Surya
Community Champion
March 2, 2023

Hi @Muhammad Moazzam Hassan 

I have some suggestion for you 

  1. Go to the Workflow section of the project that has the issue you want to clone.
  2. Select the transition you want to add the post-function to. This is the transition that triggers the cloning of the issue.
  3. Click on the Edit button for the transition to open the Edit Transition screen.
  4. In the Edit Transition screen, click on the Post Functions tab.
  5. Click on the Add Post Function button to open the Add Post Function screen.
  6. From the list of post-functions, select the "Copy a parsed text to a field" post-function.
  7. In the configuration screen that appears, set the following:
    • Field to Copy: Select the Schedule Date Time Field.
    • Parsed Text: Enter the following: "{{now.format('yyyy-MM-dd')}} {{original.scheduleDateTimeField|time}}"
    • Target Field: Select the Schedule Date Time Field.
  8. Click on the Add button to add the post-function to the transition.
  9. Click on the Publish Draft button to save the changes to the workflow.

    Let me know if this works for you 
Muhammad Moazzam Hassan
Contributor
March 2, 2023

Isn't it possible via automation rule?

Muhammad Moazzam Hassan
Contributor
March 5, 2023

I am able to achieve it via automation Thanks for your response. The smart value I used is

{{now.format("yyyy-MM-dd")}}T{{issue.customfield_10143.format("HH:mm:ss.SSSZ")}}

Like Jerryton Surya likes this
Jerryton Surya
Community Champion
March 5, 2023

Happy to help!

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events