Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to restrict object selection based on Project for portal only customers

Danilo Simic July 8, 2024

Hello,

 

I have an object type called "Business Services" in which I added an attribute called "Related projects" which can hold projects.

 

I want to add an AQL to the filter issues scope so that only objects where a project is selected are available for the given project. 
For example, in Object 1 I have added project ABC, I want this object to be available only when a ticket is being created in project ABC.

I tested one solution but this only worked for Agents. Portal only customer did not see anything for some reason. 

This is the full AQL I used:

(object having inR("Jira User" = ${reporter}) or object having inR("User Group" having user(${reporter}))) and "Related Projects" = ${project}

 

I bolded the part that I added to the AQL which worked but only for Agents as I mentioned above.

 

Is there a way to implement this so that it includes portal only customers as well?

 

Adding a screenshot of the field configuration:

AQL field configuration.PNG

2 answers

0 votes
Adolfo Casari
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.
July 19, 2024

@Danilo Simicuse this clause:

Related Projects = currentProject()

It works for me.

Danilo Simic July 21, 2024

Hello @Adolfo Casari , can you share the the configuration of Roles for the schema for which this worked in your case?

 

It works for portal only customers as well?

Adolfo Casari
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.
July 22, 2024

In your own example, Business Service should have an attribute Related Projects of type Project.

With that I control on what JSM projects that service can be displayed or not. I also filter the objects by issuetype (i.e. request type) and jira group with:

"Tipo" = ${issuetype.label} AND "Grupo Afecto" having user("currentUser()")

Where Tipo is a select type attribute and Grupo Afecto is a group type attribute.

0 votes
Adolfo Casari
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.
July 8, 2024

I think you need to go to Roles in your schema where "Business Services" is and check that "Object Schema Users permissions for Jira Service Management Customers" is Enabled.

Danilo Simic July 8, 2024

Hello Adolfo,

 

If it is an issue with roles in the object schema, how come that customers can see and search for objects with this AQL:

(object having inR("Jira User" = ${reporter}) or object having inR("User Group" having user(${reporter})))

 

This AQL is only missing the part referencing the projects.

 

Could it be related to project permissions maybe?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events