Considering Script Runner for 5 use cases

Hi,

we currently have 5 use cases, which we are seemingly not able to solve with JIRA Cloud out of the box.

Script Runner seems to be the plugin that could help us out, but as I do not know the plugin, I would like to check with you guys beforehand. We have the following 5 requirements:

  1. Parent Tasks and Sub Tasks share the same screen, are shown on separate boards (configured via board filters) but follow different workflows (5 step workflow for parent vs 3 step for sub). It is important for us that all values populated in custom and default fields are inherited by the sub tasks.
    1. It would be nice that the inherited values are then set to read only (but not must have)
  2. Make specific custom fields mandatory if a certain value has been chosen within another custom field
  3. Add read only text fields
  4. Automatically create a certain set of sub tasks when the parent task has transitioned within the workflow
  5. Automatically change parent task status, when changing status of one or more sub tasks. E.g. if subtaskA is moved to the column Done, then the parent task should move automatically to the next column in the parent task board.

Is this generally doable with script runner?


Regards

Kian

 

1 answer

Hi @Kian Pariwar,

  1. Using ScriptRunner for JIRA Cloud you can configure post functions on transitions or event listeners (for e.g. create issue events) to populate subtask fields with the values entered in parent fields
  2. Atlassian don't provide any way to customise the create or edit screens, so this isn't currently possible
  3. I don't think this is possible either for the same reason as 2
  4. This can definitely be achieved using a ScriptRunner post function
  5. This can definitely be done using ScriptRunner

Hope that helps! Don't hesitate to ask if you have any more questions,

Jon

 

Hi Jon,

thanks for the clarification.

One more question regarding my point 4 above:

  • We have several country teams, for which we would need to create separate sub tasks. The only way we know which country team needs to work on a sub task, depends on the value(s) selected in a "Select List (multiple choices) custom field.
  • E.g. if a parent issue is created where countries UK, US and France are selected, we would need to create SubTaskA 3 times (one for each selected country)
  • Nice to have feature: Each sub task inherits one of the selected countries in the Country field (it is the same custom field as in the parent task), so that it is directly clear, which sub task belongs to which country.

Is this also realizable with ScriptRunner?

 

 

 

Yes that's definitely possible. When creating the subtasks for each country, you can set a custom field to be the value of that country.

just to be clear:

The sub task creation is not performed by me but by scriptrunner. ScriptRunner does not only need to auto create sub tasks when a parent task has transitioned, but it also needs to check the country custom field and create the same set of sub tasks multiple times, if several Countries have been selected. When doing so, it would be nice, if it also could prepopulate the custom country field with the country it created the sub task for (so not all 3 countries but only one of those for each auto-created sub task).

Apologies - when I said "you can set a custom field" I meant "the script that is run by ScriptRunner can set a custom field".

On the parent transition, you would have a postfunction that would read the countries out of the custom field on the parent issue, then create a subtask for each of those countries, setting the value of the custom field on that subtask to be the country the subtask was created for.

Sorry, one more use case just came up:

6. Every Monday, a specified set of parent and sub tasks needs to be created at 8am

Does scriptrunner support this kind of  autocreation based on a predefined schedule?

At the moment we have no support for scheduled tasks in ScriptRunner for JIRA Cloud. I'll bring it up at our planning meeting later today.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

243 views 1 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you