How to restrict user from access View Issue Screen in JIRA DC?

Digvijay Singh Gehlot May 21, 2024

Hi All,

I want to restrict a user or a group of users to access a View Issue screen. 

Here, the User is Reporter, who created the issue from direct HTML link. eg: https://<my-jira-instance>/secure/CreateIssueDetails!init.jspa?pid=XXXXX&issuetype=XXXXX

After clicking on Create button, he should redirected to his Dashboard only.

In Dashboard, I have used a Filter Results gadget and added column - Summary.

I want that when that User logins, goes to Dashboard, and clicks on the issue link under Summary, he should land on Edit Issue screen only on a specific link like: /secure/EditIssue!default.jspa?id=XXXXX.

By default, when user clicks on the issue under Summary in Dashboard, he lands on the View Issue screen. 

I want to redirect the User (who is a Reporter on that Issue), should land on the Edit Issue screen.

Is there any way we can redirect the links or make any changes in settings or achieve this by using scriptrunner? It would be a great help.

Thank you 

2 answers

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.
May 21, 2024

Welcome to the Atlassian Community!

There's no way to do this.  The link given to the user for the issue view is coded into the heart of Jira, as it is presented as a way to see the whole issue.  There's nothing that could change that link, even Scriptrunner can't override the core code for it.

I would like to take a step back and question the desire to do this.  The way I read your question is that it sounds like you want to stop people viewing an issue, but always forcing them into the editing of it whenever they look at it.

Is that really useful?  What is the problem you are trying to address by stopping view and only allowing edit?

Digvijay Singh Gehlot May 29, 2024

Hi @Nic Brough -Adaptavist- 

Thank you for your message. 

My use case is - I have Sales team where I only want them to access their own dashboard when they login. 

To create a new issue I have provided them this link /secure/CreateDetails! Init. Jspa? Pid=xxxxx&issuetype=xxxxx using a direct html link on dashboard. 

It will look like they are filling an Intake form on a different browser tab. 

If they want to update the issue, I have provided them Edit Issue a dynamic url like /Editissue! Default. Jspa? Id=xxxxx using automation and it will open in a new tab like a form. 

My issue is, whenever sales person submits the issue by clicking on Create button on Create issue link Or clicking on Update button on Edit issue link, they are landed on View Issue screen. 

I just want that sales person should be redirected to Dashboard, bypassing or restricting to View Issue. 

I have added some custom fields which are hidden on Create and Edit screens for sales team and they should not see View Screen in this case. 

Is there any workaround to redirect sales person to Dashboard after creating or updating the issue, and bypassing View issue screen. 

I would be a great help. 

And can we use listeners in this case? 

Thank you

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.
June 1, 2024

That's not a "use case", that's just making a system harder to use and be helpful to your people.

What you're trying to do here is counter-intuitive for people and also irrelevant as people can directly edit data from the issue view anyway.

Could you explain why you think this is a good idea?  Why is it useful to take someone away from the context of what they are working on without showing them what they have achieved?

0 votes
Ram Kumar Aravindakshan _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.
May 21, 2024

Hi @Digvijay Singh Gehlot

ScriptRunner can only restrict field access and visibility via Behaviour, and Behaviour only works for the Create / Edit / Transition and Assign Issue screens and not on the view screen.

You could maybe try using the Issue Security Schema. Please refer to this Community Post for more info.

Thank you and Kind regards,
Ram

Digvijay Singh Gehlot June 9, 2024

Hi @Ram Kumar Aravindakshan _Adaptavist_ 

Thank you for sharing the above community link.

I tried to create an Issue Security Scheme, where:

- Created two groups: Admin Group & User Group

- In Permission Scheme, added Admin Group only to Set Issue Security permission

- In Security Scheme, I added one Security Level, named as "Admin Only" and selected Group as "Admin Group" and added the Security Level field to Issue screen.

I observed that,

- When login with User account > Clicking on Create button on CreateDetails (direct HTML link): User is not able to see Security Field and he is still able to land on View Issue screen, and View the Issue (let's say, issuekey: DSG-1).

- When login with Admin account > Clicking on Create button on CreateDetails (direct HTML link): Admin can see the Security Field on Create Issue screen and he can select "Admin Only" option and after clicking the button, he can see the View Issue screen with Security Field value (let's say, issuekey: DSG-2)

- When searching for DSG-2 from User account, User is not able to see as it says "You don't have access to this issue"

But my requirement is:

- When a user from User Group, clicks on Create button (present on /secure/CreateDetails!init.jspa?pid=xxxxx&issuetype=xxxxx), he should be redirected to a specific Dashboard selectPageID=XXXXX, bypassing/ restricting the User to view his own Issue on View Issue screen.

- But with an exception that, when the same User clicks on an Edit Issue Link (/Editissue! Default. Jspa?id=xxxxx) (For that, I have created a customField "Edit Form" by passing a dynamic URL and make it as a hyperlink on the User's Dashboard) > Makes changes on that Edit Issue Link > Hits the Update button: User should again go back to his Dashboard, bypassing or restricting him to View his own Issue on View Issue screen. 

To provide you with more information, I have tried multiple options to achieve this like:

- I have created a Fragment where I am able to hide the Menus present on Top Navigation Bar on the particular Dashboard with the help of this Community Post 

- Here, I am not allowing User Group to view projects, issues, etc. as I want them to see a simple Dashboard with a Create Form Link and Edit Form Link for their own issues.

- Even, I hide the Summary (system field) and added a custom Summary field (without a hyperlink) so that when User view his Dashboard, he should not get any access, to land on their own issues on View Issue screen. - He can only Create and/or Edit his own issues.

I know this is something against the workflow of JIRA, but my Client wants to show their Sales team a simple Intake Form link where they can just create a new Intake Form and Edit the same but all the issue transitions and status changes are managed by the Admin group from the Board and they are only allowed to View the User's Issues.

I hope I am able to provide as much info as possible. Please guide me further with a solution using scriptrunner (like Behaviour/Fragments/REST Endpoint APIs) or any other workaround and will appreciate your valuable insights.  

Thanks.   

Digvijay Singh Gehlot June 9, 2024

Hi @Radek Dostál 

May you also provide more insights for my above case as I am able to hide the Top Navigation Bar on a specific Dashboard?

It will be a great help.

Thanks

Radek Dostál
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 10, 2024

I'm agreeing with Nic, I don't quite get the use case nor do I think there is a "anywhere ok" way to go about this. To be honest, I still do question the use case for hiding the Create button for a specific dashboard, except that there is a "somewhat ok" way to do it without completely changing the way Jira works and looks, whereas forcing an edit screen instead of view doesn't sound like something you can do without gutting the unstable underlying JS that's baked into the tool by Atlassian, there's simply no decent way to do it while making the tool behave in an (imo) unexpected way.

Suggest an answer

Log in or Sign up to answer