One issuetype visible to the relevant group by ScriptRunner

Sebastian December 6, 2022

Hello,

I still find any information about this topic.

Example:

I have 4 issue type in servicdesk interal users (Task, Bug,Story,Epic) and I want to give access one of issuetype for group member they can only view for example Task in queue . It's possible?

Ideally, I would like to use ScriptRunner.

2 answers

0 votes
Sebastian December 7, 2022

Please, give me more suggestion

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 6, 2022

Hi @Sebastian and welcome to the community,

I'm not sure I follow 100% your question, so I'll lay all info below:

  • You have 4 issue types on a JSM project (Task, Bug,Story,Epic) 
  • The above issue types are being used by JSW users, meaning not by customers on request types etc (they are not associated with request types)
  • You want to create a queue with only the issue type Task, and this queue should be visible only to one group (Or you want a specific group to see only the Task issue type, and not have visibility of the other issue types?)

Kindly confirm, or edit the above statements.

Sebastian December 6, 2022

Hello @Alex Koxaras _Relational_ ,

Thanks for your reply.

You understand everything right

 I want a specific group to see only the Task issue type, and not have visibility of the other issue types.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 6, 2022
Sebastian December 6, 2022

Sorry, but this issue security scheme is not clear for me. I created this, but isn't working.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 6, 2022

If you follow the documentation it will work. This is why it was designed in the first place. When you have an issue, you can apply to it a security level from a security scheme:

  • You create a scheme
  • You create issue levels
    • On each issue level you add the people who you want to view the specific issue
  • You enable the security level on the project

Now you define a default security level, but in your case you want to add a post function on the create transition of the Task workflow, to "get" the specific security level.

Sebastian December 6, 2022

@Alex Koxaras _Relational_Who of types in post function I should use?

I added issue security scheme, and associate to appropriate project.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 6, 2022

Use one post function which will allow you to edit the Security Level field to the one you want.

Sebastian December 6, 2022

I know that one , just which one?

Sebastian December 6, 2022

Add a comment to this issue [ScriptRunner] Adds a templated comment to the current issue, as the user making the transition.


Add/remove from sprint [ScriptRunner] Add/remove the issue to/from a sprint on transition.


Adds a comment to linked issues when this issue is transitioned [ScriptRunner] Useful for alerting participants of other issues that a blocker is resolved, etc. This function should be put on the Resolve transition (or similar).


Adds the current user as a watcher [ScriptRunner] Adds the user performing the action as a watcher, if condition applies.


Archive this issue [ScriptRunner] Archive the current issue, which can help improve performance


Assign From Field (Power Utilities) This function assigns an issue to a user from the custom field.


Assign to Current User Assigns the issue to the current user if the current user has the 'Assignable User' permission.


Assign to Lead Developer Assigns the issue to the project/component lead developer


Assign to Reporter Assigns the issue to the reporter


Assign to Workflow Step Actor (Power Utilities) This function assigns issue to actor who performed a previous workflow step.


Assign to first member of role [ScriptRunner] Assign to the first member of the specified role.


Assign to last role member [ScriptRunner] Assign this issue to the last user from the specified role who this issue was assigned to previously.


Clear field(s) [ScriptRunner] Clear selected fields


Clones an issue, and links [ScriptRunner] Clones this issue to another issue, optionally another project and issue type, and creates a link.


Copy field values [ScriptRunner] Copy field values from one field to another


Create Comment Adds a comment to an issue if one is entered during a transition.


Create Perforce Job Function Creates a Perforce Job (if required) after completing the workflow transition.


Create a sub-task [ScriptRunner] Create a sub-task. Will optionally reopen a matching sub-task.


Custom script post-function [ScriptRunner] Run your own groovy script from a file or entered into Jira.


Fast-track transition an issue [ScriptRunner] If the condition is met, automatically transition this issue to another status.


Fire Event Fires an event that can be processed by listeners.


Fires an event when condition is true [ScriptRunner] Fires an event that can be picked up by a notification scheme, in order to send mail only under certain conditions, eg Priority is Blocker.


Insight Post-Function Run an Insight Post-Function.


Issue Clone Post Function (Power Utilities) This function clones issue.

Modify Smart Checklist Performs operations on Smart Checklist


Post a message to Slack [ScriptRunner] Allows you to define a customisable message to send to a Slack room.


Send a custom email [ScriptRunner] Send an email based on the provided template if conditions are met.


Set Original Estimation (Power Utilities) This function copies the value from the custom field to the original estimation.


Set issue security level depending on provided condition [ScriptRunner] Sets issue security if the provided condition evaluates to true.


Store Issue Stores updates to an issue (no change history is created).


Transition parent when all subtasks are resolved [ScriptRunner] Transition the parent issue through the provided action when all sub-tasks are resolved.


Trigger a Webhook If this post-function is executed, Jira will post the issue content in JSON format to the URL specified.


Update Issue Field Updates a simple issue field to a given value.


Update Issue Status Sets issue status to the linked status of the destination workflow step.
sumUp Post-Function

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.
December 6, 2022

Update issue field will do it, but as you have Scriptrunner, I would recommend using "set issue security level" - it's a bit more flexible and easier to use.

Sebastian December 6, 2022

@Nic Brough -Adaptavist-  i don't show option "set issue security level" in scriptrunner

Sebastian December 6, 2022

@Nic Brough -Adaptavist-ok I found this option, but which code condition i should provide?

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.
December 6, 2022

Whatever code condition you need.  Probably something like "issue type = X"

Sebastian December 7, 2022

Is not working for me.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 7, 2022

@Sebastian post a screenshot of your solution so far;

  • Issue security scheme
  • Security levels
  • Workflow post functions

Simply saying "Is not working for me" isn't much helpful for us to provide additional help.

Suggest an answer

Log in or Sign up to answer