Example:
Today is 05/25/2023 and if I create a task on 06/26/2023 (30 days) it will show an error message,
and if I create a task between the interval on 05/25/2023-06/25/2023 there is no error and the task is being created.
What is the query to get that result??
and what type of validator can I use??
Hi @RIZKY JTUASIKAL ,
what do you mean by "I create a task on 06/26/2023"? Where is that date input? In a custom field?
Hi @David Fischer ,
it doesn't use custom field/date input.
is that possible?
or does it have to use date input?
please advice,
thank you David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Example:
I created subtask A, and will record the creation date.
Created on 05/25/2023.
Then there is a rule if it is still within 30 days (bases on the date of subtask A creation),
I can still create another subtask,
(ex: subtask B)
but, if it exceeds 30 days, I can't create subtask B
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So to summarize:
Is that correct?
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.
Hi @RIZKY JTUASIKAL ,
in that case, you can use a Build-your-own Validator with this Jira Expression:
!issue.parent || !issue.parent.subtasks.some(sub=>sub.created < new Date().minusDays(30))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @David Fischer ,
" when you attempt to create a second sub-task on that issue, you want to disable the creation if the first sub-task was created more than 30 days earlier "
what if these two subtasks are different issue types and workflows?
Ex:
subtask 1 is "Release Project"
subtask 2 is "Release PIR"
does it mean that I have to create a validator in the create transition (in Release PIR workflow)?
so that subtask 2 cannot be created if it exceeds 30 days
for addtional information,
I use the Release Project - Created Date field as the reference date.
This field (Release Project - Created Date) is the date when subtask 1 was created.
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.
Thank you @David Fischer , for the answers
I really appreciate it
but one more question,
"With my script, you don't need to refer to the Prelease Project - Created Date since the script looks at all sub-tasks and their creation date"
what if only one of the subtasks?
for example, Release PIR subtask only
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then you can use your custom field instead:
!issue.parent || !issue.parent.customfield_12345 || issue.parent.customfield_12345 >= new Date().minusDays(30)
where customfield_12345 is the custom field ID of the Release Project - Created date custom field.
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.