Why is a variable workaround needed to Use Custom Field with withNextDayOfWeek() Function?

Florian Wehner
Contributor
November 12, 2024

Hello!

I the `withNextDayOfWeek()` function does not seem to work when directly using a custom field. The custom field is a list that has days of week like `MON`, `TUE` as expected in the documentation.

{{issue.DueDate.withNextDayOfWeek(issue.customfield_11069).plusWeeks(issue.customfield_11068.floor.minus(1))}}

I could successfully get this to work by creating a variable first, and then just using that in the function. Is there some magic going on why a single select list would not just be a string?

Thank you! --Flo

1 answer

1 accepted

1 vote
Answer accepted
Bill Sheboy
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.
November 12, 2024

Hi @Florian Wehner 

You describe your customfield_11069 has a list of days of the week.  Is it a single-select, option field?

If so, please change your parameter to explicitly use the selected value.  Otherwise I believe the default attribute returned is the id, such as 1, 2, 3...

issue.customfield_11069.value

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events