Compare two Custom Datefields

Jens Kisters //SeibertSolutions
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 24, 2016

I want to check in an JQL if one custom date field is greater or equal than another custom datefield.

I tried using Script Runner and the Expression issueFunction in dateCompare("", "Urlaubsende  >= Urlaubsanfang ") 

but i get the error

"Field name: Urlaubsende > not found or not a date or datetime."

other solution attempts than using script runner are welcome

6 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Vasiliy Zverev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 24, 2016
1 vote
Damien Braz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 24, 2016

Oh, I got it, Field name: Urlaubsende > not found or not a date or datetime.

 

I think the '>=' can't be used. In your expression, the operator choosen is '='. '>' is a part of Urlaubsende! smile

0 votes
Ignacio Pulgar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 24, 2016

Comparing two date fields in JQL is not supported: https://jira.atlassian.com/browse/JRA-20727

Unfortunately, it is not even in Atlassian's roadmap.

There's a workaround for JIRA Server through the usage of Script Runner.

0 votes
Jens Kisters //SeibertSolutions
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 24, 2016

Hi Damien, 

im pretty sure its not a typo, "Urlaubsende is not EMPTY AND Urlaubsanfang is not EMPTY" works.

Is that what you meant?

I also removed any spaces, no luck

0 votes
Damien Braz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 24, 2016

Hi Jens, 

 

Have you seen this page?

 

@Jamie Echlin [Adaptavist] gave an answer smile

 

Damien.

0 votes
Jens Kisters //SeibertSolutions
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 24, 2016

i tried adding +1w to both dates but that wont convert the customfields to datetime 

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events