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

Need to Populate field with Future date

Sanjivani Wayal
Contributor
January 15, 2024

We have a requirement to create a custom field as date but  restricted to past or Current date, not future to be populated. Don't want it to be on workflow , we have Automation and scriptrunner 

 

Can anyone help how this can be done?

1 answer

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.
January 15, 2024

Hi Sanjivani,

How will this field be populated? By automation/script? Or directly by a user? 

If by automation/script, then you should be able to remove the field from the Edit screen but leave it on the view screen and have the automation rule or ScriptRunner script populate it. 

If by user, then you can see if the ScriptRunner Behaviours app will meet your need. Otherwise, it would need to be with a Validator on the workflow. Which I am curious why you are against that option? 

Sanjivani Wayal
Contributor
January 16, 2024

Hi ,

 

This field will be populated by User directly i tried doing automation only on 1 thing is failing that if user populates future date it keeps making it null in the Edit condition i have put {{fieldChange.fromString.format("yyyy/MM/dd")}} and if in Edit condition i put {{fieldChange.fromString}} it gives me error (The Date must be of the format "yyyy-MM-dd" (customfield_10969))

 

This is when user edits future value and I need to bring it back to its old value (which can be past date or todays date or null)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, ace, atlassian community event, donation, girls who code, women in tech, malala fund, plan international, kudos, community badge, badge, atlassian badge, International Women’s month, International Women’s Day, women's month, women's day

10 for Change at Atlassian Community Events

Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!

Join an Atlassian Community Event!
AUG Leaders

Upcoming Jira Events