Creating JQL query on Jira that will pull tickets from multiple projects - jira

I'm trying to create a JQL query that will pull tickets from 3 separate projects, with the same field.
So I wanna get all tickets that have the field month= 'May' from project1, project2, project3.

You can use the in clause
Something like this

Related

Issue joining Jira Sprints and BoardCharts tables in Tableau

Using the Tableau Connector Jira plugin, I am attempting to join the Sprints and BoardCharts tables in Tableau.
I have created a Data Source in Jira with the Sprints table:
...and the Board Charts table:
But when I come to create the relationship in the Tableau data connection:
...it complains of type mismatch between the two Sprint Id fields:
Casting or converting one or the other value in the relationship will slow things down too much. What am I missing? Why are they different data types?

Strange Assignee names coming from Assignee column in jiraissue table

I am using Jira backend database to pull some columns for reporting. Assignee column in jiraissue table stores the Webkey ID/usernames of all the employees. I join this with cwd_user to get the full name of the assignee. But I also see some weird values like the ones below. I don't have a clue about how to get the display names of these users. They are not Webkey ID/usernames.
Any thoughts on what I might be missing?
The app_user table has the current userid in the lower_user_name column
If you're running a recent version of Jira, there was a GDPR-related change that causes all newly-created users to have a key starting with JIRAUSER instead of their username. Users can also be anonymized through this feature.
You can get a mapping of JIRAUSER keys to usernames through the JIRA API's Get User endpoint -- not sure where to look in the database for this mapping yet.

join query in rails 4

i am developing a job portal using rails 4.
i have search box where job seeker can search jobs. currently i am able to do it for job title and description , as follows
scope :by_name_or_desc,lambda{|search| where(" title ilike (?) or description ilike(?)","%#{search}%","%#{search}%") if search.present?}
i want to use the same search box for skills also where seeker can search job using skill. i have skill_ids as a column in my Job model . which is array field. how can i modify above query to do the same.
i also tried doing this ,
scope :by_name_or_desc,lambda{|search| where(" title ilike (?) or description ilike(?) or '#{search}' = ANY (skill_ids)","%#{search}%","%#{search}%") if search.present?}
If you use PostgreSQL, you should take a look at Full Text Search feature. Otherwise i recommend you to use Elastic Search or Sphinx for this kind of stuff. Full-text search is not what RDBMS designed for. With project's growth your approach will be only a headache.

Excluding properies for JIRA JQL search using REST API

I am using JIRA rest api for jql search. It says we can filter out fields using fields parameter. Is there a way we can filter out properties from a particular field. eg. field assignee has many properties. But I am interested only in property displayName. Is there a way we can filter out all other properties?
Is there a way we can filter out all other properties?
There is no way to hide other properties of assignee.
JQL will search all properties inside the assignee field to check if something is matching. So it should work out-of-the-box, for example assignee = "John Smith", in this case John Smith is the display name.

Rails 3 chained associations and scope

I have Project and Entry as models. Projects can have many entries, and entries belong to only a project. Entries have dates.
One reporting requirement is to show Projects that have Entries for a particular month. I have been successful in using scopes to achieve this, i.e. Project.with_entries.on(param_the_month).
The issue is that I now want to display the entries for that month only, grouped by projects.
If I do projects.each do |p|, then query for the entries (p.entries), the returned entries are for all months, not just the month I specified.
While this is an obvious result, is there a way in Rails to simply return the entries for that month using my original chained scope?
Edit: I did misunderstand :)
Take 2: You can merge scopes across models. So if you can create a where-type scope on Entry to select entries from a given month, you can then try something like
Project.with_entries.on(param_the_month).merge(Entry.on(param_the_month))
I've called it on by analogy with your scope on Project - without seeing your data model I can't say how exactly to implement it.
has-many associations also accept scopes, so you can do projects.entries.your_scope to filter them. The downside is that this would require another database query for every project, which might be slow depending on the size of your database.
An alternative that does not require extra queries would be to fetch the entries already filtered, and then go upward to get the projects:
entries = Entry.my_conditions.includes(:project)
entries_by_project = entries.group_by(&:project)
Now you have a hash whose keys are the projects, and the values are only the entries of that project that pass your conditions.
You can add includes into your scope, this way it will not query for those records again, it will eager load them when you use project scope.
scope :my_scope, includes(:entries).where( :active => true )

Resources