Jira Misc workflow extensions - Assign Issue to Project Role not changing the assignment

Dan Scott June 2, 2014

Hello,

I am trying to create a transition that will assign the issue to a specific project role (there is only one user in the role but the person will change from time to time).

I am using the postfunction "Assign issue to the default user from Project Role" from the Jira Misc Workflow Extensions plugin.

The transition executes but the assignment never changes.

Does this postfunction need to be in a specific spot on the postfunction list (currently it is the first)?

Are there any pre-conditions that have to be met for this postfunction to execute?

Thank you for any help you can provide.

Dan

3 answers

1 accepted

0 votes
Answer accepted
Dan Scott June 3, 2014

So.... yes that was it!

I knew it would be something fundamental.

To rescue a particle of self-respect I could comment on the slight UI issue on the project role screen that only shows the edit interface if you happen to float in the right area. I was always hovering in the wrong areas and falling back on the only assigment interface I had found but that would be grasping at straws.

Thank you so much for helping me find the issue and I apologize for taking up so much of your time.

I really appreciate the plug-in since it allows me to create the workflow I need so thank for that as well.

Cheers,

Dan

Dan Scott June 3, 2014

David [Innovalog] · 1,451 karma · 58 mins ago

Just to make sure: you did add users to project roles for your project, not just in the Role maangement screen?

Raju Adluru December 8, 2015

Hhi David, i am using "Assign to project Role" post function in create transition in workflow, i have added a group(not a user) in project role in that project. this is not working, issue is not assigned to project role!!

0 votes
Mehmet Kazgan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2014

Hi Dan,

I think that post function is meant for the Project Lead role which is a single user you setup via administration. In other words, even if it would work and you would have multiple users and groups assigned to that project role, JIRA would not know who the default user/group would be from that list.

JIRA is meant to have a single user as an assignee. In some scenarios, I create a user with a distribution list email (like support-team) and all members get an email and assignee would be a single user still. From there users can assign the tickets to themselves personally.

I think what is happening about the assignee is not changing is because you have a project lead assigned in Project>admin>roles as default assignee is the lead.

Dan Scott June 2, 2014

You may be right but the description of the add-on implies it can be any role defined in your project.

I need this level of indirection in order for our workflow to function correctly. I need the issue to be assigned to a specific role not a specific user because the user may change but the role will not.

David _old account_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2014

Hi Mehmet,

you are confusing the Project Lead "property" with Project Roles.

The Assign Issue to Project Role post-function works with Project Roles.

0 votes
David _old account_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2014

Hi Dan,

the position is important in two cases:

- in the Create transition

- if you have other post-functions that might change the assignee

The simplest is to move the function around the "Create the issue originally" function and see which position works best.

This is described at the top of the documentation page for post-functions.

David.

Dan Scott June 2, 2014

Hi David,

Thanks for the response!

The transition occurs after the issue has been created and we will need to change the assignment often during the life cycle of the issue. It will always be to a project role so this flexibility is very useful to us.

The issue is first created by a user and they will be the default assignee, when they are ready to move it along they select the appropriate transition. This is the first instance where the assignment in question needs to occur (and the one I am currently debugging).

There are no other assignments in the postfunction list, here is what it looks like right now:

  1. Assign the issue to the default user from the Design Lead role .
  2. Set issue status to the linked status of the destination workflow step.
  3. Add a comment to an issue if one is entered during a transition.
  4. Update change history for an issue and store the issue in the database.
  5. Re-index an issue to keep indexes in sync with the database.
  6. Fire a Generic Event event that can be processed by the listeners.

The other 5 postfunctions appear to be there by default and can't be deleted (I am sure you know all about those).

I may be overlooking something very basic as I am new to JIRA but it "appears" to be set up correctly. I have users in all the roles and they have permission to set assignments (if that is relevant).

We are using Jira Ondemand if that is a factor.

Thanks again for any help....it is turning into quite a hair puller.

Dan

David _old account_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2014

Ok, this seems to be set up correctly.

First thing you need to check is that, if you associate a transition screen to your transition and add the Assignee field to that screen, you can indeed select the user that is the member of the project role you want. If you can't select it manually, it's a permission issue (for example if the user is not "assignable").

Also, make sure you do not put the Assignee field on your transition screen if you want the assignment to take place automatically (thanks to the post-function).

Dan Scott June 2, 2014

We were not using a screen in these transitions, the transition purpose was to move the issue to the user with the project role and inform them they had a new issue so we wanted this to happen transparently.

As a test I enabled the default screen during the transition to check if the assignment was possible and it seemed to work fine doing it manually.

Next I created a custom screen containing only a comment field to see if there was any change and tried the transition again.

The new screen was invoked but the assignment was not made and the original assignee remained active.

I suspect I must be doing something very basic incorrectly since the cause is so elusive.

Could this have anything to do with using OnDemand rather than an installed version of Jira?

David _old account_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 3, 2014

I have just tested your use case on an OnDemand instance, and it works just fine. I added the post-function to the "Start Progress" transition of the default workflow (which has no transition screen) to assign the issue to the "Observer" project role. I then added a single user to that role. When I transition an issue, it is correctly assigned to that user.

So I have no idea what is going on.

Can you check that the workflow is indeed the correct one, and correctly published, by adding another post-function to the same transition, a function whose effect is easily verifiable?

Dan Scott June 3, 2014

Hi David,

Thanks for verifiy the use case. I tried your suggestion earlier to confirm things were hooked up correctly.

The transition is being called through the proper workflow and other postfunctions are working.

I will recheck everything once more though just to be thorough.

I will also try to verify that jira understands the roles I defined and who the users are. They are all showing as expected but I have not used them elsewhere.

David _old account_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 3, 2014

Just to make sure: you did add users to project roles for your project, not just in the Role maangement screen?

Dan Scott June 3, 2014

I thought that I had but like I said...noob here.

Will confirm/deny. I know the roles are in the project as they show up in the project/roles screen.

I have a feeling it is something that basic though since it proving troublesome.

David _old account_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 3, 2014

You're quite welcome.

Don't forget to mark the question as answered.

Also, if you like the plugin, don't hesitate to leave an evaluation on the MarketPlace ;-)

Cheers,

David

Raju Adluru December 8, 2015

@David Fisher i am using "Assign to project Role" post function in create transition in workflow, i have added a group(not a user) in project role in that project. this is not working, issue is not assigned to project role!!

Suggest an answer

Log in or Sign up to answer