Forums

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

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 edited

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
atlassian, out of office, loom, confluence, async collaboration, meeting recaps, remote teamwork, team alignment, knowledge sharing, AI-powered notes, productivity tools, workforce continuity, teamwork collection

Put your meeting notes on autopilot with Loom + Confluence

AI-powered meeting notes keep work moving even if you’re out of the office. Enjoy your well-deserved time off and return refreshed, confident you’ll catch up in no time.

Learn more
AUG Leaders

Atlassian Community Events