Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,103
Community Members
 
Community Events
168
Community Groups

How to restrict Insight object selection on customer portal but not in agent view

Charlie Misonne Community Leader Aug 10, 2022

Hi Community!

For a certain JSM project we have an Insight object type called Application. This type has an boolean attribute Portal visibility .

We created an Insight custom field for this object type with the following filter scope:
objecttype = "Application" AND "Portal visibility" = "True"

Now I want to keep the filter on the portal but on the agent view I want JSM agents to be able to pick any Application object regardless of the attribute.
I don't want to do this in a new custom field because the current field is being used in some automation rules.

I'm sure I'm not the only one struggling with this. Does anyone have a workaround?
I was thinking about using Filter issue scope instead of Filter scope because the former is not taken into consideration by automation rules so I could set the value with an automation rule. But I don't want to create an automation rule for every possible value.

Any ideas are welcome!

1 answer

Hi @Charlie Misonne 

perhaps you can create an additional custom attribute and duplicate it with an automation. 
in this case you can keep the logic if your automation rules. The only thing could be that you have to change the trigger, in case you use issue creation trigger. 

I have no other idea, but i am very interested in the usecase. Can you explain in more details what and why you want to do?

Charlie Misonne Community Leader Aug 10, 2022

Hi Frederic,

Thanks for your answer.

Can you elaborate on the additional custom attribute please? I'm not sure I understand what you have in mind.

The usecase: end users can create incidents and service requests for a subset of applications. There are other applications that can not be accessed by the end users. But we do want agents to be able to create incidents for these applications because we have an automated second line process that relies on that field.

Hi @Charlie Misonne ,

I had the following in mind

  • PortalField
  • With filter scope portal visability

 

  • internal field
  • without filter scope

 

  • user creates incidens or service request with applicationX in the portalfield.
  • automation copies applicationX from portalfield to internal field.
  • if your other automations rely on the issue creation, you perhaps have to change this to issue modify with an if. Perhaps there is another way. 

BUT I have another idea for you. 
have look here: https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Insight-IQL-Restricting-a-fields-values-by-current-users-group/qaq-p/964765

I think you can do it like explained in the post. In think you have 2 possibilities. 

  1. add every user to an user attribute field and filter directly on that field. This would be very fine grained, but an massive amount of work.
  2. Create group objects in another schema or objecttype and filter on “user belongs to group”. The group is added to your application object. 

If you get this working a detailed description, including screenshots would be very nice. If you need any further help please post your tries and we will find a solution together.

Like Charlie Misonne likes this
Charlie Misonne Community Leader Aug 11, 2022

Thanks Frederic! I get the idea now :-)

For the groups: this would be used in a Filter issue scope right?
Our agents and customers are already in different groups so it could be easy to implement.

I have understood it like that.

If you have the agents and users already in different groups it sounds perfect for your need. 

If i have some free time, i will try to build a test. Perhaps you have some further insights for us, until i get there. 

You can also dynamically manage the Filter Scope via a behavior. In code you could analyze the role of the current user (i.e. if the user is an agent), then the Filter Scope would show all applications, while if the user is not an agent, then the Filter Scope would only show a subset of applications.

This would allow the agents to submit tickets through the portal (best-practice) as somebody else for any application, while normal customers would only see their subset.

Charlie Misonne Community Leader Sep 07, 2022

Hi David,

Thanks for your suggestion. I assume you are referring to ScriptRunner behaviors?

Those are not available in Jira Cloud. Let me know if you meant something else.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events