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,300,668
Community Members
 
Community Events
165
Community Groups

Usage of placeholders in (Riada) Insight custom field

M Amine Community Leader Sep 13, 2018

Hi,

I'm trying to use a placeholder in 'Filter issue scope' in Insight Object/s custom field (CF) and I'm in trouble. 

Here is the use case: 

  • I have an object 'Application' having an attribute called 'Type'
  • The CF configuration that is working fine is the following: 
    • Filter Issue scope : Type = "Incident"
  • The CF configuration that is NOT working in Jira Service Desk (portal) : 
    • Filter Issue scope : Type = ${customfield_XXXXX}  
      I have created a hidden custom field that I populate with 'Incident'

My thought is that the hidden field is perhaps populated by Jira after the request creation that's why insight cannot find it. ?!?

My questions are:

  1. Are there any logs where the i can follow what insight is trying to do and what are the values of the placeholder?
  2. How can I solve my problem?

Thank you

4 answers

1 accepted

2 votes
Answer accepted

Hi Mohammed,

Can you try to convert the attribute that holds the value "Incident" & "Request" to objects instead ? Then it might be easier to achieve what you need.

The idea is to create an objectType called "Request type". Then create an object called Incident and another called Request. In your objectType "Application" change the type of the the attribute (let's call it Request_type as well) from default text into object and then reference the objectType you created "Request type". Then in your IQL filter you can use something like objectType HAVING inR(${Request_Type}).

If you have more questions feel free to share them anytime!

Cheers!

Nader

M Amine Community Leader Sep 17, 2018

Hi Youssef,

Thank you for your answer. It worked perfectly well (I changed your IQL: Used Filter Issue Scope (IQL) : Type = ${Request_Type} and added an Insight CF as hidden to the portal, so I can change its default value depending on the request type).  

But What I don't understand, is that, according to the documentation, placeholders must work with Jira custom fields also which is not the case here. Can you please explain why? what am I missing here?

thank you

They do work.

So if You would setup your field with:

Object Type mapping to apps, and Filter Issue Scope referenced either to Issue type or Customer Request Type (in JIRA SD) it would work. However You would need to keep attribute naming convention exactly the same as Issue Types or Customer Request Types. Any alteration (capital letters, special chars, etc.) between IQL in Filter Issue Scope, naming conventions used in non-Insight fields and values of attributes in Insight objects would break it.

What Youssef proposed is a good approach but misses actual reference to Issue Type/Customer Request Type itself (as is based on Insight objects only - which gives consistency of data). To have it related to e.g. Customer request types in JIRA SD I would setup hidden fields in CRTs on portal - to be auto populated with respective request type Insight object. Without JIRA SD I would use Workflow PF to populate it automatically based on Issue Type.

Or simply - mind the naming conventions and skip Request Types objects in Insight, mapping directly to CRT/IT if they are listed as attributes in App objects.

Like Amr Hamza likes this

I had the same issue here and solved it by putting .label in the placeholder of my custom field. (My custom field was a single select list)

So for yours:
Type = ${customfieldName.label}  

I am aware this is a few years too late but might help someone else who comes across this thread like I did trying to solve it..

wow! @Claire Berry thanks a lot :) it did help! haha 

it's always worth posting an answer :) 

0 votes
M Amine Community Leader Sep 13, 2018

@Alexander Sundström can you please help?

 

thank you

OK, I might know what is all about, but to not mislead You I would need some more details:

1. Hidden Field - what kind is it? Insight, or JIRA Field (Text, Select etc.)?
2. Do you have ObjectType in Insight called "Type" or "Incident"?
3. Have you tested variable with CF name instead of custom field_XXXXX?
4. Have You considered using Postfunction to populate it? cause auto populating values to Insight or JIRA fields based on Insight object attributes or Insight Field values do not work automatically on in-line editing

M Amine Community Leader Sep 13, 2018

Dear @PJ Wysota,

Thank you for your quick reply. Here are the needed info

  1. Jira custom field (text or select list, I can change it to Insight CF or other if needed)
  2. No
  3. No I will do that now and get back to you
  4. No, because first I need the used (customer) to pick a value in field 'Application'. So post-function won't work. Just to be a bit more clear: I have an objectType named Application with Objects A (Attribute Type= Incident), Object B (Attribute Type = Request), Object C (attribute Type = Incident). So I want to display to the customer (end user) only Objects A and C based on Jira Custom field which will have the value 'Incident'. So if I change the value of this Jira Custom field to 'Request', the end user will see object B. 

thank you

M Amine Community Leader Sep 13, 2018

for 3. Doesn't work. I have also tried hiding the 'summary' and using the $summary while filling the summary with the right info. Was trying to see if the problem is coming from Insight not supporting custom fields. 

OK, so it is more clear now. 

You mismatching some use cases. But to make it faster - here are solutions:

Field Application - to be picked by User - it should be Insight CF with Filter Issue Scope - it should pint out to "ObjectType = Application"

Then Your hidden field - if this is JIRA CF (text/Select) - use post function - Set a Jira custom field with the attribute value from a selected object with setup against your source field = Application, attribute Type, and Target Field name. NOta that with Select - it has to maintain EXACTLY the same values as Type attribute in Insight.

If You want your Type attribute to populate into Insight Field - Type should be Insight object (Insight Fields are not populating attributes directly, they can render attributes along with Objects, but not attribute values instead of objects).

And then setup would require some more sophisticated IQL.



thank you @PJ Wysota for your reply,  But when I read your answser I think that perhaps I didn't explain my use case very well. 

I will try to be clearer. 

  • You have an object type 'Application' and a attribute 'Type'
  • We have 3 objects
    • Confluence Server with Type="On premise"
    • Jira Server  with Type="On premise"
    • Jira Cloud with Type ="Cloud"
  • We have two request types:
    • Request 1: 'Cloud Applications' => I want to display only Jira CLoud
    • Request 2: 'Server Applications' => I want to display the other applications
  • Solutions:
    1. Solution 1: I can use the filter scope with Type = "On Premise" for Request 1 and Type = "Cloud" for Request 2. Please NOTICE that this solution is working PERFECTLY WELL
    2. Solution 2: I want to use placeholders in the IQL. Is it possible? someone can help please?
Like Florian Reichl likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

Improving the Create Issue Experience in Jira Service Management Cloud

Hello everyone!  We are very excited to announce some much needed changes to the issue create experience in JSM (the blue "create" button) at the top of the screen.  We have just starte...

186 views 7 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you