Forums

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

How to update a date field type while changing a statatus?

Paulina Mijal August 2, 2022

Dear all, 

I want to capture a date when a specific task has changed status form x to y. I was thinking about creating a new date field and set up a post function. However, I don't know which post function will provide that functionality. 

2 answers

1 vote
Rik de Valk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 2, 2022

Hi @Paulina Mijal , the out-of-the-box post functions only includes the "Update Issue Field" post function which allows you to update some system fields (such as assignee, resolution, priority).

  • If you have JMWE (Jira Misc Workflow Extensions) you can use the "Set field value" post function to set a custom field using a groovy expression or static value.
  • If you have Scriptrunner you can use "Custom script post-function" to set the date fields value using Groovy.

A different approach to this is to use a scripted listener on a transition event and set the field value using a Groovy script (requires scriptrunner).

There are other apps that can help you do the trick (just search for 'workflow' or 'post function' on the marketplace).

Link to JMWE docs on this post function: https://innovalog.atlassian.net/wiki/spaces/JMWE/pages/68878480/Set+field+value

Link to Scriptrunner post function: https://docs.adaptavist.com/sr4js/latest/features/workflows/post-functions/custom-post-functions/custom-post-function-examples/set-issue-attributes

Link to Scriptrunner scripted listener: https://docs.adaptavist.com/sr4js/latest/features/listeners/custom-listener

Paulina Mijal August 2, 2022

Okay, thank you for advice. I have one more question. I need this information (transition information) in another application. I will be using the API to get it. I just wanted to get the data from the fields, but maybe it is possible in another way?

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 2, 2022

Hi Paulina,

I do not use server version and it has fewer post functions than what is in Cloud. Can you share a screenshot of your Post Function options? 

Suggest an answer

Log in or Sign up to answer