Jira: automatically set author of issue to "project lead"

Hi,

our workflow requires, that the owner of a issue always the project lead is. Is it possible to set the author of an issue to the project lead automatically?

Cheers

Jannik

3 answers

1 accepted

1 vote

You could do this with a script to override the reporter (script runner plugin is the easiest option). I'd strongly recommend doing it in the background - never offer the field to the user.

I'm afraid you're stuck then, you do need a bit of code to do this.

Thank you for your comment. We are currently on an OnDemand instance, so this isn't possible).

But I understand, that this is currently not a "core" supported feature (= just configurable) but needs to be scripted by myself (although it seems reasonable easy to do - except the issue with OnDemand).

I found an easy way for my special case (see my own answer), but will accept your answer, as it fixes the issue in a more generic way.

For new issues:

You will need to have separate workflow for each project/project lead, plugin"JIRA Misc Workflow Extensions" and plugin "JIRA Suite Utilities". I hope they are available for OnDemand.

1. Add custom field Owner to project

2. in your workflow open Create issue tranistion

3. Add postfunction "Update Issue Custom Field" Field "Owner" and as value use project lead username.

4. Add postfunction "Copy Value From Field to Field" (Copy from "Owner" to "Reporter")

5. Make sure about execution order (update should be before copy)

6. Publish workflow

For already existing issues:

Execute bulk change.

This has some consequences - you're adding a "project owner" field to every single issue, and hard-coding the project lead's account into your workflow, so you need a different workflow for each project lead, and you'll need to edit the workflow when you change leads.

If you're willing to accept the change of project lead means workflow editing, then there's a far more simple approach - forget an "owner" field and simply set the reporter to the hard-coded user name. You don't need any plugins to do this if I remember correctly.

Personally, I wouldn't even attempt this, it's an immense amount of pain to set up and nearly as bad to maintain.

I would like to only use a single workflow instead of duplicating them throughout the system. So I guess I would use your version - if we ever decide to use the self hosted version.

I actually found an easy way (for my special case).

The background of my question is, that I don't want "regular" users to change the assigned user - just a small selected part of the staff should do that.

If I remove the permissions to assign users from them and set the default assignee to the project lead, it works as intended, since they can't change it.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,317 views 14 20
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot