I want to get the current week number of the month, Is there any possible way to get that?
I already try {{now.weekOfYear}} and it works but I want the WeekOfMonth which is (1-5 weeks is a month)
Hello @jeoj
Welcome to the community.
I believe this is possible in the Automation function for self-hosted Jira.
If you look at the documentation for date/time format smart values.
https://confluence.atlassian.com/automation/jira-smart-values-date-and-time-993924864.html
...you may notice at the bottom of the table a link to additional Java documentation.
Per that documentation you should be able to get the week of the month by using
{{now.format("F")}}
I'm new here and considered a newbie Jira user. Trying to use the Jira automation. Saw this thread regarding getting the "week format". Appreciate your guidance. Thanks in advance.
Where do you specify {{now.format("W")}} in Jira as i'm trying to get the week but got the long string format Sprint Week 2024-04-24T04:35:40.3+0000 when using this Jira Smart value Sprint Week {{now.plusWeeks(4)}}.if i use Sprint Week {{now.weekOfYear}}, it will only provide me the current week of the year & not the future.
And putting in summary Sprint Week {{now.weekOfYear(4)}} does not work at all as it does not even print out the week.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kaniawati Zainal Abidin
Please start a new Question to ensure your question gets better visibility in the community. The only people who have seen your additional to this older, answered post are the original author, responders, and anybody that elected to watch it. You can better utilize crowd sourcing in the community to get help if you start a new Question.
If this older post is relevant to your question, then include a link to it in your new post.
It is also important to tell us the hosting type of your Jira instance. Is it the Cloud/SaaS hosting model or the self-hosted Server or Data Center product? The Automation functionality has significant differences between those hosting models.
It seems like you might already have a post where you are asking this question:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worth mentioning it is with lowercase w and not W as the accepted answer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
According to the documentation:
https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
...a lower case "w" will get you the week of the year (1-52) while an upper case "W" or upper case "F" will get you the week of the month, which is what the author asked for.
I haven't recently tested both recently, but I would be surprised to learn that "w" gives you the week of month.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.