automatize issuetype by user group

Karla Cavalcanti November 13, 2017

Hi guys, a question..

  • is it possible put the issuetype default in the creation issue according with the user and his associated group?

    my project has a big list of issuetypes.. and each issuetype represents an area in my company. (screenshot attached)
    I have one group in JIRA for each area too.

    for example:
    I am in the infrastructure group in JIRA... so, when I create an new issue in this project I would like the issuetype could present filled automatically with the issuetype thats represents my area(group) so that I don't need seacrh in the list.

     

    • I can not put one issuetype as default because there is no one specific default...
      Each user can have a different group.

      I dont know if this option is possible in native JIRA.
      But if you know another option with add-ons can helps too..
      my customer has some main add-ons, like script runner and JMWE. So, we can use if necessary for this situation.

      I dont know how to do.. maybe relates a value of group with the issuetype.
      or create a field that copy the value of this field to the issuetype..
      or use several postfunctions in create issue to fill the values.

      I think some solutions but I don't know how can I do their..

      Help me please.

2 answers

1 accepted

0 votes
Answer accepted
Justin Evans
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.
November 14, 2017

Hi Karla - I'm not sure if you have Power Scripts for Jira installed, but there is an example script available that demonstrates how you can restrict the available options for Issue Type depending on the user's project role or group association in Jira's user directory.

Forbidding users to create some issue types

The example shows how to check against the project lead (projectPM), but you can also check against groups with userInGroup() and check against project roles with isUserInRole()

Karla Cavalcanti November 16, 2017

Hi Justin!!

Perfect!! 

So, I will talk to my customer to purchase this addon to achieve this need.

Tks a lot!!!
Regards

Karla Cavalcanti November 16, 2017

a doubt Justin.

 

with this solution, is possible automatize the issuetype by user as my customer needs... 

perfect!

but the user couldn't change the issuetype for another type?

 

The idea is fill automatically the issuetype according user group to the user dont need select in the list, in order to improve the user experience in JIRA

But the user could change to another issuetype if necessary in any situation.

Is it possible with your solution???

 

tkss

Justin Evans
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.
November 16, 2017

Hi Karla;

Yes, this scenario is possible. Instead of using lfRestrictSelectOptions() for the issuetype field, you can instead use lfSet() along with lfInstantHook() to automatically populate the issuetype depending on the logged-in user's role, group, etc while still allowing the user to change the issuetype if desired.

Karla Cavalcanti November 17, 2017

Wow!! Perfect Justin!!

tks a lot for your help and your attention!!!

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.
November 13, 2017

I'm afraid the short answer is "no".  If someone can create an issue in a project, then they can create any type of issue.

Some add-ons can provide you with some ways to block creation, and the behaviours module in Script Runner can be a bit more clever and remove the option to create the "wrong" issue type in some places, but the solutions are either ugly (which annoys users) or quite easy to bypass.

Karla Cavalcanti November 13, 2017

Hi Nic.

 

Could you explain me about this "ugly" soluttion, please.

I would like understand how can I do this solution if it is possible.

Thank you very much!

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.
November 13, 2017

The "ugly" option is to put an impossible validator on the create transition.

From the user's point of view, this goes:

  • I click "create issue" because I think something needs doing
  • I fill in a form with several fields, including one where I write an essay that explains the problem in detail
  • I click "create"
  • I get told "you can't create this because 1 != 2"
  • I go hunt down and punish my Jira admin because they've wasted my time and effectively told me my feelings about an issue are irrelevant.

This is a BAD solution.  A good solution is to design your project and issue type structure correctly (possibly take a look at service desk, if your users are not good at working out where to raise stuff)

Karla Cavalcanti November 14, 2017

Ok... this (impossible) situation is for jira core... 

Thanks Nic!

Suggest an answer

Log in or Sign up to answer