Forums

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

Create a Misc Custom Field for Week Number

A_lis February 18, 2021

Hello,

 I have one problem with https://community.atlassian.com/t5/Answers-Developer-Questions/Create-a-Misc-Custom-Field-for-Week-Number/qaq-p/572242

I added a Calculated Date custom field type, then set up Groovy:

new java.text.SimpleDateFormat("w").format(issue.get("customfield_10619")) 

------------

 

customfield_10619--- this custom field has a value 1.01.2021 --> so it's 53 week

unfortunately formula return value: 1 week not 53;/

So so, what can I do now, what should I change?

1 answer

0 votes
Alexander Pappert
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.
February 18, 2021

does it calculate the 31.12.2020 as week 53?

does it calculate 04.01.2021 as week 1 or 2

maybe something with the new year 2021

grafik.png

A_lis February 18, 2021

Now formula: Calculate that 1/1/2021 is 1 week.
And it should be correct that 1/1/2021 is 53 week

So still, the question is: what needs to be changed in the formula? Any suggestions?

Suggest an answer

Log in or Sign up to answer