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


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?



3 answers

1 accepted

1 vote
Accepted answer

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 Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,095 views 4 9
Read article

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