How to prevent changeset' submit based on current time? - gerrit

I'd like to allow gerrit's submit only on specific time (day of week and hours). Can it be done?
No documention of gerrit i've found mentions this. The documentation also doesn't mention, when gerrit's submit filters / prolog scripts run (is it on page creation or when i press submit button or maybe both?). There doesn't seem to be an easy way to add / remove label on given time.

Related

Isn't there any way to execute a post function script for free?

I'd like to perform operations like automatically update a field based on another field's value (for example if the assignee field is empty automatically assign to a default, set an hidden "due date" field based on the release-fix start date, ecc.) or write a custom validator that does validations based on a combination of values.
Every time I go searching on the jira forum I find java fragments of code, so everything seems to be possible, but it seems it is only at one condition: to buy the script runner plugin!
It seems strange to me: of course this plugin seems to be doing a lot of boilerplate for you but...what if I want to make a little more effort but still not payng for something that, in my opinion, should be free? I'm already paying the software license...isn't there another way to perform such post actions?
Try MyGroovy. It provides similar features. For tasks like execution post-functions I suppose it would fits good.

Multiple Export of Different Selections in Dropdown selection

I'm trying to find a way to automatically change the dropdown to the next name on the list, wait for a second or so for the results below to change and then export that page as PDF!
I would do it manually but there will be about 100 names on the list!
The data pulls up fine it's just the avoiding all the manual work that would be done each month for the 100 people!
And maybe if there's a way to rename the pdf with the name of the person?
Too Much?
I
Why not make a script ?
You could first get all the item of your drop down list, then you change the cell value of your drop down list and you pause the script for 1 second.
If you need more help to do it just ask me !
this is not really resolvable in the scope of Google Sheets only. basically what you need is a macro that will run outside of the box and automate whole this process while you take a quick nap. you should look into AutoHotKey which is able to do exactly what you want with delays, auto clicking on buttons to download and stuff like that. there is full documentation on how to build your script, many tutorials and even discord channel if you need pro help. Example:
https://youtu.be/bS-ycdoOyj8

Jenkins - Show "Advanced" job parameters from drop down / advanced button

I have a Jenkins job where some parameters are optional but if they are changed they can fail the job almost instantly.
I added useful information next to each parameter, wrote "DO NOT CHANGE" next to those which are sensitive and even explained to the users to don't touch anything unless they know what they are doing. Unfortunately, that doesn't help; People are still changing values and the job fails.
Hiding the parameters completely (for example, with the use of the "Hidden Parameter plugin") is not an option because I still want to give access to the more advanced users, but keep the everyday users away.
Is there a way to hide the advanced parameters (by use of a drop down ["Basic/Advanced"] or maybe an "Advanced..." button that'll show the parameters?

jira script runner script that counts 2 statuses or fields togheter

i want to count how many issues are in status open, and in verify (our custom flow) per day.
if today 3 issues entered into status open, and 3 entered into status verify i would like to see the result of that field saying 6.
now sure how the script should be done in SCRIPT RUNNER.
thanks guys =)
It would help if you could tell what you want to solve. JIRA allows you to define filters, that will give all the time as result a list of issues found. You can then define / use reports and / or gadgets on dashboards to display the data based on those filters.
So a solution could be:
Define a filter that searches for the issues. Something like project = XYZ AND status in (open, verify).
Save that filter under a name (e.g. "Open and verified").
Use that filter then in a gadget that displays the issues as chart, ...

Get JIRA issue status time

There is a status in my JIRA instance called "Ready For Test" at which the tester would validate and close the jira. I need to know the amount of time the JIRA is in that particular status since it was moved from "In Progress" to "Ready to Test".
Is there a JQL query that can do it? I need this time field to be exported to Excel as well so that I can name and shame people and ask them to close the JIRAs as soon as they can.
I don't think it is possible on clean Jira installation. There are two plugins I know providing this kind of functionality:
Time in Status - self-explanatory
Enhancer Plugin (sorry, can't post more than two links) - adds a configurable time in status custom field, bt if I remember it correctly, it can display value only after you leave the status.
These are both paid, so that can be an issue.
Another option (if you're not using OnDemand) is the Script Runner Plugin. This plugin will allow you to create your own workflow postfunctions so you can store the "Ready to Test" transition date to one custom field and either calculate time and write it to another custom field when leaving that status or write a scripted field that will calculate and display current time since entering status. This solution is free (not counting your time to implement the functions).
Thanks #SilenyHobit for the idea. Here is what I've done:
First installed JIRA Suite Utilities plugin (its FREE)
Added a custom field called RFTDate (date type control)
Added a post function in RFT transition to update RFTDate with current datetime
Voila!!!
As an alternative, you can use Status Time Jira app. It provides reports on how much time passed in each status.
Once you enter your working calendar into the app, it takes your working schedule into account too. That is, "In Progress" time of an issue opened on Friday at 5 PM and closed on Monday at 9 AM, will be a few hours rather than 3 days. It has various other reports like assignee time, status entry dates, average/sum reports by any field(eg. average in progress time by project, average cycle time by issue creation month). And all these are available as gadgets on the dashboard too.
Here is the online demo link, you can see it in action and try.
As a free solution, you can try the limited version Status Time Free.

Resources