Hi,
My project has a validator for certain issue types to make sure issues have a due date when changing the status to "In Progress".
I'd like the validator (or a different one) to also make sure that due date is only Sundays.
We have ScriptRunner.
Is that possible?
Thanks
Hello @Neta Knyazhansky Caspy
If I understand correctly, you would like the "Due Date" field to only allow dates that fall on a Sunday, correct?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have no experience with ScriptRunner.
I propose an automation that sets the "Due Date" field to the next Sunday based on the input. The change is observable after a refresh.
Automation setup:
The full automation looks like this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for such a detailed response, I appreciate it.
In this case, the due date doesn't have to be the following Sunday, it can be any Sunday.
Any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would you accept an automation that sets the Due Date to the previous Sunday if a date in the future is selected Mo-Sat?
If yes, I can create it for you as well with the check that Due Date is automatically set to the next Sunday if set in the past or present week Mo-Sat.
Logically this would make sense to me.
Unfortunately I could not find a validation/condition to bind this to in the workflow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This would be a perfect solution.
If the due date is set to Mon-Sat, then it will automatically change to the *following* Sunday.
I'd very much appreciate your assistance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You wrote that if the date is Mon-Sat, then it is set to the following Sunday.
In my previous comment I wrote that it would be set to the previous Sunday.,
My logic is that if the due date is set for, say, Friday, December 16, 2022, then it would make sense to me that it has to be done by that date.
To meet the due date, we need to stay at -X or 0 days Due Date.
I see three options:
Conditions:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The use case is that deployment is part of our DoD and we only deploy on Sunday, so even if the work is done Mon-Sat, the Story can only be closed after the deployment on the following Sunday.
Therefore, option #1 is the best - Always set the Due date to the next Sunday.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In that case my previous detailed comment from 28th November is applicable. It works for any week not only the next Sunday (that was just an example I gave).
Here is the full setup with a recommendation:
Final thoughts:
If you have any questions or are struggling with something let me know. I will be happy to help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are the BEST!
The only thing that isn't working is the InputDate in the comment, it looks like this:
"You have set the due date to **."
I guess something needs to be changed in step 3?
Any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Happy to hear this works for you. I had a lot of fun with this automation.
Can you please share how you approached the third step?
If I follow my example it should look like this:
I can imagine that automating the visibility of comments (or creating a new account for this) can also be tricky, so if you get stuck, feel free to ask for help in that area as well.
Adding the comment automation (step 7.) so you have the full picture.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found what wasn't configured correctly.
I didn't realize the configuration is case-sensitive so the Variable name in step 3 didn't match the syntax in step 7.
I fixed it and it's working perfectly now.
I can't express my thanks to you in words!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.