Append %%CURRENT_DATETIME%% to a custom field

Kristen Hallas July 25, 2018

Hello! 

What kind of custom field do we need to create that allows us to append placeholder "%%CURRENT_DATETIME%%" to it?

Our goal: We want to count how many times an issue has transitioned out of a revision workflow and back into a draft workflow. We're trying to achieve this with a post function that updates an issue's custom field.

 

Specifics

We first tried to do this by appending a number (1) / a string("try again"), but realized this would not work because those are not "multi-value" fields.

(Source: https://community.atlassian.com/t5/Jira-questions/Jira-quot-update-CF-quot-post-function-doesn-t-append-value-only/qaq-p/671102)

We realized we could use the %%CURRENT_DATETIME%% placeholder in a post function, and capture this date after every transition out of revision into draft. We could not use this placeholder to successfully update any fields... not even a date/time field, which has us scratching our heads!

What are we missing? We're open to any insight into why we're encountering this issue, as well as any suggestions that could help us achieve our goal. 

2 answers

1 vote
Heily Hindrea April 17, 2019

I also need something similar, but I need actually the list of dates every time the issue goes to In Progress. I used the MultiLine Text field and thought this transition will append the new date to the field every time the transition is fired. However, in reality, it just overrides the previous value :(.

Any thoughts in here?

Daniel Lowe November 7, 2019

Heily within the post function did you tick the append tickbox? If not it will overwrite

Quentin SCHNEIDER January 2, 2020

Hello @Daniel Lowe  I try to achieve the same thing and with the tickbox ticked, it's overwrite too.

Help :(

Like daniel_gamez likes this
0 votes
donjoe August 1, 2018

Hello @Kristen Hallas,

You could use a Date Picker custom field instead of the number field or the date time field. 

Once you have created the transition the issue would take to move from revision into draft, you should add an "Update Issue Custom Field" post function.

In the new window that pops up, select your new Date Time picker as the Issue Custom Field and add

%%CURRENT_DATETIME%%

I am guessing you have already done this. Just wanted to go through to see if you have used Date Picker itself and the same steps for adding the function... 

I guess you might also need a counter for how many times the issue has transitioned. For that, you could refer to @Nick Menere's answer here: How to increment a custom field's number on a specific transition

 

Have a good day!
Don

Suggest an answer

Log in or Sign up to answer