Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Database Inner Joins and Riada Insight (help for the community)

Hi

 

Thought I'd give back a little. I recently figured out DB inner joins and used this info to pipe Service Management DB info about portal forms, Id's, the fields on the forms, the groups etc etc into Insight to make life a lot easier in seeing what fields are where. I also pipe this info into Insight fields so users can easily select which forms they need tweaking and what fields they'd like added.

 

Here's my DB query

select
public."AO_54307E_VIEWPORTFIELD"."FORM_ID" as "Form ID",
public."AO_54307E_VIEWPORTFORM"."NAME" as "Form Name",
public."AO_54307E_GROUP"."GROUP_NAME" as "Group Name",
public."AO_54307E_VIEWPORTFIELD"."LABEL" as "Field Name",
public."AO_54307E_VIEWPORTFIELD"."FIELD_ID" as "Field ID",
public."AO_54307E_VIEWPORTFORM"."ISSUE_TYPE_ID" as "Issue Type ID"
FROM
public."AO_54307E_VIEWPORTFIELD"
inner join public."AO_54307E_VIEWPORTFORM"
on public."AO_54307E_VIEWPORTFORM"."ID" = public."AO_54307E_VIEWPORTFIELD"."FORM_ID"
inner join public."AO_54307E_GROUPTOREQUESTTYPE"
on public."AO_54307E_GROUPTOREQUESTTYPE"."REQUEST_TYPE_ID" = public."AO_54307E_VIEWPORTFORM"."ID"
inner join public."AO_54307E_GROUP"
on public."AO_54307E_GROUPTOREQUESTTYPE"."GROUP_ID" = public."AO_54307E_GROUP"."ID";

 

Here's what my Import module looks like

import module.PNG

The Regex I use on the Field_ID part of the DB to match it up with the ID attribute of my Custom Field object Type

(?<=\_)([\w]{1,})

What it's doing is only starting from after the underscore. See the ViewPortFields table stores the custom fields as 'customfield_xxxxx', where as the ID in the customfields table is just the ID itself.

 

Anyway, here's the end result 😊

insight schema.PNG

0 comments

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Confluence

Introducing External Collaboration for Confluence

We’re excited to introduce external collaboration for Confluence, now available in early access. It is available to preview for Confluence Cloud Premium and Enterprise customers. (If you're not on ...

186 views 0 7
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