Forums

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

How Can I Compare a Custom Field like "User 1" ( mapped a Date field) to Due Date field?

Raghavendra kaushik March 7, 2023

Hello,

We have mapped a Custom Field : "User 1" as "Planned Start date". In my Dashboard JQL query, I would like to filter all my stories where "User 1" ( Planned Start Date) value is greater than my current date.

1. Is there a way I can convert my custom field - ( User 1) to a Date field?

2. secondly, for comparing against current date, is 'startOfDay()' the right function to be used in JQL?

Thanks

1 answer

0 votes
Jack Brickey
Community Champion
March 7, 2023

Hi @Raghavendra kaushik , you cannot use JQL to compare two date fields. You could create an Automation rule to compare the dates and add a label or comment. You cannot change a custom field to a different type. You could create a new field of type date and copy the data over thru various means, e.g. export/import, automation rule.

Raghavendra kaushik March 9, 2023

Thanks Jack.

Since I am new here. Can you please elaborate step wise?

Regards,

Raghavendra Kaushik

Jack Brickey
Community Champion
March 9, 2023

Hi @Raghavendra kaushik

if you are looking for step-by-step example of an automation rule to compare to dates, there are quite a number of posts in the community that discussed this. Here is The result from a quick search I did. This documentation reference is also extremely valuable understanding how date fields work - jira-smart-values-date-and-time . Understanding more about your specific use case would allow me to provide a more detailed response. 

Like Bektas Ozan Topkaya likes this
Raghavendra kaushik March 10, 2023

Hi Jack,

Here is my use case:

1. I have custom field named as "User 2" in which I am storing a date value . example: 2023/03/10.

2. I need to compare the above stored date value with a JIRA date field , say "Due Date". Also, How can I compare the above stored date value ( in User 2 field) with functions like 'now() or 'startOfDay()'.

Please help with the above requirements.

Also, I did look at the various links provided by you. It seems  "Creating a Variable via automation" is possible on Cloud version only and not on premise version.

I just realized, in our Org we might using  On premise and Not Cloud ( I am not sure). Below the dashboard page, I saw the version number mentioned (attached screenshot). Please do throw some light on this as well- if such automation is even possible on premise version or not.

Thanks

Jack Brickey
Community Champion
March 10, 2023

Hi @Raghavendra kaushik , if you are using on premise server based you may not have "automation for Jira" addon which this conversation is based upon. At this point, I would highly recommend reaching out to your organization administrator, and discussing your needs to understand what might be possible, and the best approach.

One thing for sure, is that if this one field you want to compare to is a text field that you are inserting a date into then you'll have to convert it to a date field to do any effective comparison. 

Like Raghavendra kaushik likes this
Raghavendra kaushik March 13, 2023

Thanks Jack!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events