Display Parent Issue's Status at Point of Creation on Sub-task?
Could you describe how to have a field that displays on my Sub-tasks’s (view) screen that displays the status of the parent issue at the time the sub-tasks was created. It should be static and not change even if the parent issue’s status is updated.
Is that possible?
Comments (8)
-
repo owner -
reporter This is good, and thank you for the fast reply!
Could a modification to this be made so that if the parent task is in certain statuses a sub-task can be restricted from being created?
-
repo owner This is a complete new question, anyway I will answer here: If you want to restrict subtask's creation according to parent's status, you have to use "Boolean validator with math, date-time or text-string terms" at ""Create Issue" transition of subtask's workflow.
EXAMPLE: We want to allow subtask creation only when parent issue is at statuses "Open", "Reopened" and "In Progress".
We will add "Boolean validator with math, date-time or text-string terms" at ""Create Issue" transition of subtask's workflow with the following configuration:
Boolean expression used is: %{00042} in ["Open", "Reopened", "In Progress"]
Notice that %{00042} is field code for "Parent's issue status" virtual field.
Once configured, transition "Create Issue" in subtask's workflow will look like this:
-
reporter Amazing, thanks. I will try this right away.
UPDATE: The validation works. Would it be a similar process to create a field that displays the 'validation failed' message on the sub-task create screen?
-
repo owner Sorry, I don't understand the question, since the message "Subtask's creation is not allowed for parent issue's current status" is a customized failure message that is shown when trying to create a subtask from an unsuitable parent issue status.
-
reporter It's works well, but only appears after clicking submit. Just thought it might be a better experience for the user to know the issue will not be allowed to be made prior to taking the time to complete the form.
I think I can do it myself using the toolbox but only if the sub-task is aware of its parent at the point of the create screen being presented. That way I can create a big red field that reads "Sub-tasks cannot be created from the current status," or something to that effect.
EDIT: of course all user will know after we educate them on how to use the project but i'm trying to prepare for the scenario in which someone forgets and fills out a bunch of details that on the screen that may potentially be lost when they have to navigate away from it.
-
repo owner You can do something like:
- Create a "Text Field (single line)" custom field called "Warning Message".
- Add the field to parent's issue view screen.
- Add "Copy a parsed text to a field" to all transitions with destination unsuitable statuses for subtask creation. Use the following configuration:
- Add "Copy a parsed text to a field" to all transitions with destination suitable statuses for subtask creation. Use the following configuration:
-
reporter - changed status to resolved
- Log in to comment
Yes, it's possible to do it as I explain now:
Notice that %{00042} is field code for "Parent's issue status" virtual field.
Once configured, transition "Create Issue" in subtask's workflow will look like this:
Please, insert the post-function after "Creates the issue originally." system post-function.