Forums

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

Is it possible to copy value from "Target End date" to another date field in "Automation for Jira"?

Jun_Feng_master
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 23, 2018

Hi,

I've got a requirement to create an automation rule that will monitor the change of the Target End date on a particular type of story.  If the story belongs to type A, I want to compare the story's Target End date with the Epic's custom field "Target End A" and copy the value to "Target End A" if it is a later date.

Two problems I encountered:

  1. I'm not sure how to compare the date field using the condition in Automation for Jira.  There's "Equal" and "Not Equal" but I couldn't find an option to find out whether a date field is larger/later than another date field.
  2. I try to copy the "Target End" value from the triggerIssue and put it in "Target End A" on the epic.  BUT "Target End" is nowhere to be found.  I suspect it is something to do with the "Target End" field is a special custom field used by Portfolio for Jira.  Is there another way to get to the value?

 

1 answer

1 accepted

0 votes
Answer accepted
Deleted user October 23, 2018

Hey there,

I couldn't find an option to find out whether a date field is larger/later than another date field.

There's an open request for this on the "Compare to" condition. You should be able to use JQL condition with smart values instead. You'll need to format the date in a JQL friendly format, something like:

"Target End date" > "{{#issue.epic.Target End A}}jqlDate{{/}}"

 

BUT "Target End" is nowhere to be found

You might need to make the target end field available to edit screens for your project https://confluence.atlassian.com/jiraportfolioserver/showing-portfolio-custom-fields-in-jira-software-857058481.html

If this isn't what you mean, could you post some screenshots of your rule config?

Cheers,

Mark C

Jun_Feng_master
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 23, 2018

Hi Mark,

Thanks for your answer.  While it's not exactly how I solved the problem but it gave me the idea to use JQL condition instead.

So for the record, my solution are:

  1. Use JQL condition and put in
    "Target End A" < {{triggerIssue.customfield_10103}}
  2. In the "Additional fields" area of Edit Issue, put in
    {
    "fields": {
    "Target End A": "{{triggerIssue.customfield_10103}}"
    }
Like Paul O'Shaughnessy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events