How to keep few sub-tasks names same (of our choice) under a parent task?

Kaushik Patel September 5, 2022

I want to keep few sub-tasks names same under a parent-task. Not same as parent task, but different title than parent task. Also, not all sub-tasks should have same exact title.

 

I have ScriptRunner Server version. I am using JIRA 8.5.1 Server version.

I am a newbie in coding. Hence, I would need query which I can run using ScriptRunner console or wherever in JIRA.

Example: A parent task has 50 sub-tasks. Out of these 50 sub-tasks, the query should allow me to mention comma separated IDs of sub-tasks for which I want to keep title as "Test-123".

The query should only impact title of the sub-tasks mentioned in the query and rest sub-tasks titles should be intact.

How can I achieve this?

Thanks,

Kaushik.

 

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 5, 2022

I am not sure what you are trying to do here.

Sub-tasks have a single parent issue, they are a part of that one issue.  It's nonsense to pretend that they are a part of two separate issues.  So there's no logical way to do what you describe.

Kaushik Patel September 6, 2022

Hi @Nic Brough -Adaptavist- All I want is few of the sub-tasks to have same titles (not necessarily same as parent one). I am not saying sub-tasks are part of two separate issues (or parent tasks).

As mentioned in my example, the parent task will be same, but in that parent task, I want several sub-tasks having same title. I hope this clarifies.

Thanks,

Kaushik.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 6, 2022

Thank you for clarifying that, but you have lead me to needing another one.

Are you asking about how you might use Scriptrunner to create sub-tasks (with the same summary), or how to use JQL to find them?

If it's a scripted create, I base all of mine on the script at https://library.adaptavist.com/entity/create-a-sub-task-when-the-parent-issue-has-a-specific-label.

If it's "how do I search", we're going to need a more detailed explanation of what you want to search for.

Kaushik Patel September 6, 2022

Thank you @Nic Brough -Adaptavist- 

It is not scripted create. Assume that the parent task already has so many sub-tasks created. Now, among those sub-tasks, I want several sub-tasks to have same title. 

So, I want know how can I use ScriptRunner to have these sub-tasks having same title (remember, not all sub-tasks under that parent task, but only the selected IDs that I might type in query)

Thanks,

Kaushik.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 6, 2022

I am sorry, but that does not help.  You've said "I don't want to create new sub-tasks" and then on the next line said "I want to create sub-tasks with the same summary as existing ones".

Could you explain what you are actually trying to do here?  What, physically should happen if you run a script to do something?

Kaushik Patel September 6, 2022

Hi @Nic Brough -Adaptavist- 

As I mentioned in above comment, "Assume that the parent task already has so many sub-tasks created." Now, among those sub-tasks, I want several sub-tasks to have same title. 

Physically when I run the query, the sub-task IDs that I would mention in query should get new title/summary as I would mention in query. But not all sub-tasks under that parent task. E.g. A parent task has 50 Sub-tasks say ABC-2 to ABC-51. Parent task ID is ABC-1. Now, by default the sub-tasks ABC-2 to ABC-51 will have same title/summary as ABC-1. Consider I want to rename sub-tasks ABC-11 to ABC-26 to have a different title/summary through query than the default parent task title/summary which other sub-tasks have. The query will not rename other sub-tasks title/summary which are not mentioned in the query.

I hope this clarifies further.

Thanks,

Kaushik.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 6, 2022

Queries are for finding issues, they do not edit them.

Given that fact, could you explain what you are looking to do?

Kaushik Patel September 6, 2022

Thanks @Nic Brough -Adaptavist- ,

I remember ScriptRunner did give me a query (which I regularly use) that can rename (change title/summary) all sub-tasks under a parent task. But that is all sub-tasks, not only selected few sub-tasks under a parent task.

I was trying to eliminate manually changing several sub-tasks names (summary/title) under a parent task. And this I have to do multiple times in a week. Fact is we have so many parent tasks for which I have to rename their respective sub-tasks title/summary and it is a repetitive process.

Since, SriptRunner gave me a query earlier which could rename/change title/ summary of all sub-tasks under a parent task, I thought there can be a query to rename few sub-tasks of choice under a parent task by keeping other sub-tasks title/summary unchanged.

Thanks,

Kaushik.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 7, 2022

I'm afraid your memory is faulty.  Scriptrunner has never had a function to edit issues during running a query.  Because Jira does not.

Suggest an answer

Log in or Sign up to answer