I have multiple issues (people) in a Jira cloud instance and they all have a birthday field.
Now, I'ld like to run a JQL to find out if anyone have a birthday today, so I can remind everyone else. Is this possible?
I also have access to the automation for jira plugin if that helps.
Assuming that your birthday field is a valid date, try birthday_field >= startOfDay() AND birthday_field < endOfDay which should give you a result set of people/issues with birthday field value that fall today. For additional references, checkout Function Reference page.
I'm afraid this won't be easily possible.
If the field is date field (e.g. 11/Dec/1979), the birthday is probably stored including year of birth and therefore time functions (now(), startOfDay(), ...) won't work.
If the field is string field (1979-12-11), then you won't be able to compare it with today as you can get now() as a string.
One idea - if you have ScriptRunner installed, create a simple custom scripted field (e.g. Birthday Anniversary) and recalculate original birthday to birthday anniversary this year (11/Dec/2019). You will be then able to compare this field with today, e.g.:
"Birthday Anniversary" = now()
On top of that, once you are able to create such filter, you can create a custom dashboard with today's birthdays and you can subscribe to this filter and get daily overview of today's birthdays.
In my team we send notification about tickets in the following ways:
Jira filters subscription for cases where we need plain(to one person/lead/manager) notification, but without fields analysis
https://confluence.atlassian.com/jira064/receiving-search-results-via-email-720416706.html?_ga=2.134616433.1430628443.1592459825-259335427.1591590509
https://confluence.atlassian.com/jira064/receiving-search-results-via-email-720416706.html?_ga=2.134616433.1430628443.1592459825-259335427.1591590509
https://github.com/dgroup/lazylead for cases where we need automatically check ticket fields, comments, links and alert corresponding person, assignee or reporter.
Please note that i'm author of https://github.com/dgroup/lazylead app.
Related
Is there a way to get the latest event of a specific type from a specific device? So far I queried all events via myURL/event/events?source=<<ID>>&type=<<type>>.
Or is there a way to get a collection of events ordered by their creationTime? This could solve my problem too
In the documentation I only found parameters like dateFrom and dateTo. But what if I don't know the time range of the last event?
The syntax is: /event/events?type={type}&source={source}.
For more information on the available endpoints:
GET /platform
Answer from the support-team:
currently there is no way to revert the order of events. Besides
dateFrom and dateTo you can also use creationFrom and creationTo. This
will take the creationTime (server side timestamp when event was
created) instead of the time (that is send within the event) But the
order will still be oldest -> newest.
Best approach currently would be to use a good estimated time range
(so you don't end up with 0 events in the response) where the
dateTo/creationTo is in the future. If you add to the query params
withTotalPages=true the result will give you the total pages in the
statistics part.
Knowing the total pages you can you can do the query again but with
currentPage=XX instead of withTotalPages=true and take the last
element.
We have this functionality on measurements and audits where you can
add the parameter revert=true. I will add an improvement that we
extend this to the other APIs but at the moment you are limited to the
workaround.
You can just only set the dateFrom parameter and the pageSize to 1 like so: &pageSize=1&dateFrom=1970-01-01. As of September 2017, this returns the most recent event.
I want to play with some really simple queries for a report, but I want to group everything by the creation date. The problem I am having is that time exists in the database, but not the date. From searching around in trac-related resources, it looks like I need to install trac.util.datefmt to be able to extract this information from datetime(time). I can find the API documentation for trac.util.datefmt, but not a download link to get the .egg.
Am I going in the right direction? If I can do what I need (i.e. get the creation month/day/year) without a plugin, what column do I use? I don't see anything else in the schema that is reasonable. If I do need trac.util.datefmt, where do I download it from? And if I really need a different plugin, which one should I be using?
I'll assume Trac >= 1.0. The time column is unix epoch time: the number of seconds that have elapsed since January 1st 1970. You can divide the value by 1e6 and put the value in a converter to see an example of extracting the datetime from the time column. trac.util.datefmt is part of the egg that ships with Trac, but since you are working with reports it doesn't sound like you need to know more about that function to accomplish your aim.
In a Trac report the time column will be automatically formatted as a date. You can look at the default report {1} as an example. I'm not sure how you intend to group by creation date. Do you wish to group tickets created in a certain datetime range?
Hope the titel of my question makes sense.
We are building reservations app.
The key stumbling block right now is how to handle reservation dates.
For instance, accordding to their specs, users can make reservations everyday except during holidays.
So, if a user makes a reservation for say, 11/20/2014, if that date is available, it is presented to user for booking.
If that date is not avaialble, the next 30 available dates are presented to the user to choose from.
I have the code to do this check but my question, how do I include the date information that users can compare to the the date they selected?
Sorry guys because I am using an old browser? it won't allow me to add my comments.
So, I am adding it here.
I am just trying to clarify that what I am confused about is how to handle dates that need to be stored on the database.
For instance, whatever date a user selected as preferred event date will need to be compared to the date on our database to see if that date is available for the event.
Where and how should I store that date on the database?
One option might be a secondary table with blackout dates. Outer join to this table and then check if a date returns that is within the range of dates being requested. No joined data, then clear to book.
I have to create "holiday" table and then create php script so I could show it on my site.
Holidays can be specific, like 15.05.2012 - 15-th of the may.
And non-specific: First(or second, third) sunday of july
Is there any way to create calculated column, so this phrase "First(or second, third) sunday of july", could turn into x.07.2012.
Use a calendar table. There is no magic code built into SQL Server that knows when Easter is. This article shows the basic premise - you fill up a table with all the dates from year x to year y, then you update a column called IsHoliday for the dates that are holidays based on specific logic (easiest to do this once, in a loop, then all your code later can refer to the calculated bit):
ASP Faq reference. The current link no longer works, this is the archive.org cached version of the page
The link in the answer now takes you to a bogus page that wants to load a virus. Just heads up.
http://codeinet.blogspot.com/2006/08/auxiliary-calendar-table-for-sql.html
This seems to be a working version.
i'm looking for the TracQuery for the trac report to get all tickets without assigned milestone listed. have you already composed this query, if yes, would you share it? thx in advance.
Something like this should do it, adapt to suit your precise needs....
SELECT
id AS ticket,
datetime(time,'unixepoch'),
summary,
status,
priority,
description AS _description
FROM ticket t
WHERE t.milestone is NULL AND t.status<>'closed'
ORDER BY time desc, status, severity, summary
The key part for you is simply to filter on the milestone being NULL.
I could reproduce the 'No matches found' for the answer by Paul Dixon, so I tried it on my own:
SELECT
id AS ticket,
time AS date,
summary,
status,
priority,
description AS _description
FROM ticket t
WHERE t.milestone not in (
SELECT name
FROM milestone
)
AND t.status<>'closed'
ORDER BY time desc, status, severity, summary
Note: Trac has some "magic" result table column names. Assigning 'date' will do the appropriate conversation of time stamp integer to date string automagically - even better - respecting the current internal Trac time stamp format of POSIX micro-seconds (since Trac 0.12) too. In this respect the SQL statement above is even the most portable solution I'm aware of.
This is quite simple using Trac's query language instead of raw SQL. On a wiki page, you can use query:milestone= to create a link to a query of all tickets without a milestone assigned. Invoke the macro [[TicketQuery(milestone=)]] to insert the list of matching tickets into the wiki page.
To do the same thing on the "Custom Query" page, remove all search criteria and add a single criteria of "milestone" "is" and leave the third field blank.