Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,560,577
Community Members
 
Community Events
185
Community Groups

How to add costume field to work flow

Edited

Hello,

We have a custom field "CloseDate" I would like to get the date in this CloseDarte filed when we are closing any tickets. I know we need to add this custom field to a workflow using post-function. I would like to know who can we add this to the workflow. I am using JIRA 7.4.4 Datacenter version. Please help me to achieve this.

 

5 comments

Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 30, 2020

Hi @Lokesh Gowda 

Welcome to the community.

Jira has already a field called Resolved. When you set the resolution on your issue the date is saved in this field.

Thanks,

 

The Management teams are asking the data need to be in CloseData only, Due to this, I am looking around it. Is there a way we can get this data to CloseData custom field 

Hi Mohamed,

Please suggest how to achieve this.

Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 05, 2020

You can't do it automatically using postfunction. You will need an addon like Automation or Scriptrunner.

HI Mohamed,

Can I use Mygroovy plugin and write a groovy script to copy the Resolved to a custom field on post function. If yes can you help me with a groovy script?

Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 06, 2020

Hi Mohamed,

I have added the groovy and getting the Close date but its showing as "2 days ago", "1 days ago" and 1 minute ago its not give the data. Please find the Groovy script and the custom field value.

 

import com.atlassian.jira.component.ComponentAccessor
import java.sql.Timestamp
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def dateCf = customFieldManager.getCustomFieldObject("customfield_10104") // Date time fields require a Timestamp
issue.setCustomFieldValue(dateCf, new Timestamp((new Date()).time))

 

CloseDateDate Time Picker

 

Can you please help me to solve this issue.

Hi Mohamed,

 

Can you please help me on this.

Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2020

Hi Lokesh,

Sorry but i'm not using this plugin and i don't know groovy. Can you open a new question on the community you might find better help than me

Hi Sanjana,

Yes, it helped me, I have completed this task.

Comment

Log in or Sign up to comment