How could I mass update Sonarqube account notifications? - notifications

I installed a Sonarqube webapp to control code quality in my company.
I use LDAP plugin to authenticate users and everything works fine.
Moreover, we use another plugin (Issue assign plugin) which assign issues to their SCM authors and send emails to them so that they can correct the code.
However, when a new user logs in, notifications are off.
We'd like to create a batch which would turn notifications on for all users (using mass update whatsoever) but we can not locate where user account's notifications are stored ...
I didn't find it in the database.
Have you an idea of where this setting is stored ? (We use Sonarqube 4.5.6 for compatibility issues).

You cannot subscribe someone else to SonarQube spam notifications.
(This should be one of the things you see Bart Simpson writing on the blackboard.)
You must convince them to subscribe themselves.
SonarQube is a tool first and foremost for developers. Shove something down a developer's throat/inbox and you it will quickly be filtered to the trash.
This is your opportunity to train new developers on how SonarQube helps them be better at their jobs and show them why they should be interested enough to subscribe on their own.

We back our instance with an Oracle database, and found the following sql to do exactly what you're asking:
Note: You'll probably want to update the created_at value to something else, but I don't think it'll make a functional difference.
INSERT INTO properties (id, user_id, prop_key, text_value, is_empty, created_at)
SELECT
PROPERTIES_SEQ.nextval,
users.id,
'notification.SQ-MyNewIssues.EmailNotificationChannel',
'true',
0,
1505275000000
FROM
users
WHERE
users.id NOT IN (
SELECT user_id
FROM properties
WHERE prop_key = 'notification.SQ-MyNewIssues.EmailNotificationChannel');
INSERT INTO properties (id, user_id, prop_key, text_value, is_empty, created_at)
SELECT
PROPERTIES_SEQ.nextval,
users.id,
'notification.ChangesOnMyIssue.EmailNotificationChannel',
'true',
0,
1505275000000
FROM
users
WHERE
users.id NOT IN (
SELECT user_id
FROM properties
WHERE prop_key = 'notification.ChangesOnMyIssue.EmailNotificationChannel');
I tried to combine the two at some point, but the sql got too complicated. Easy enough to just copy-paste.
G. Ann is correct in that users will create email filters because of the sheer bulk of notifications, especially if you turn them all on. However, sometimes managers want a unilateral solution, and if the product doesn't directly support it, you end up having to hack something together anyway.
I reckon that the incentive to filter emails would be a lot less if the information were consolidated into a rate-limited summary. I've got another stackoverflow post up about that specific scenario here: Can SonarQube notification email quantity be reduced via batching?

Related

JQL query that shows the tasks which have new comments on them

I work for a university and my group uses JIRA to maintain our technology helpdesk. We often send messages to customers and wait days to hear a response. I am looking for a filter that will show all the open tasks which are assigned to me and have a new comment from someone other than me. This way I don't have to look through all of my tasks, I can easily tell from this filter, whether any of my tickets now require a response from me.
So far I have this search:
assignee = currentUser() AND status != Done AND
updatedDate > startOfDay(-1d) AND updatedDate < endOfDay(-0d)
It doesn't look like Jira provides a way to access number of comments, last comment date, etc. The closest thing I could find in their reference was Comment which only checks the text of a comment.
Possible Alternatives
Add yourself as a watcher of the Jira issues and setup email notifications. This is what I do to manage my Jira issues. I setup a Jira folder in my email and an automated filter to move all Jira notifications into it. Then I just look through that folder multiple times per day. The downside is you'll keep more notifications than you actually need or care about.
Use Jira's REST API. If you or someone at your school has some programming knowledge, you could probably use the Jira API. Potential solution:
Use the search endpoint to get a list of issues. You can pass JQL to the API to filter the issues.
Use the get issue endpoint to get the details of each issue returned from the search. Within those details are all the comments on the issue, including the time the comment was posted.

How do I extract user details for Bloomberg Desktop API connection?

If you type IAM <GO> in the terminal you'll be shown the UserID, UUID, CLID etc.
Is it possible to extract this information through blpapi when using the Desktop API to connect via BBComm? I've seen references to Identity and populating that by sending an AuthorizationRequest but it appears that's only relevant for SAPI/B-PIPE.
To the best of my knowledge and after asking a couple of Bloomberg reps - this isn't possible. The best work around which I've found is: each user creates an EQS screen called their UUID. Add some filtering which causes this screening to return nothing. Then the application, upon start up, requests all possible UUIDs as EQS screens and stops when it doesn't get back an error - that's the UUID.
This is a dirty, dirty hack and, granted, this only works if you have few distinct users using your system. You don't want to ask may users to create such a screen and probably don't want to iterate over thousands of EQS screen names.
There is a "SID report" which is provide together with monthly invoices from Bloomberg which contains the UUIDs for users - this can be used to look up existing users but when setting up a brand new account you have to manually copy this information out of the terminal.

Advice for handling permissions in SAP

I've created a solution where I created an authorization object which controls what can a user handle or watch in the program. This authorization object is defined with 3 elements:
Process
Activity
Material group
Through transaction 'PFCG' the BC creates the profiles according the requests that users make to have permission to some module of the program. For example, a user or a group of users will access to process 'A1' (Data update), activity '01' (Aproval) and material group 'A0A00001'. This means that these users could only aprove for process 'A1' the data for material group 'A0A00001'.
My problem here is that managers of the areas have told me that they feel uncomfortable making requests to the BC for permissions because they think that they should manage those profiles, and if they want to change those permissions they would like to have the control of them directly instead of making requests.
This is a situation where I don't know what to do, I have thought that I would make Z tables and a Z program to emulate those permissions exactly as they are handled now with transaction 'PFCG' but I feel like I'm reinventing the wheel.
Another thing that I have thought is to create a Z program that would be a layer of transaction 'PFCG' to automate the profiles for this authorization objects but in this case I don't know where to start because I would have to investigate if is there a BAPI for creating profiles and how to manage all the issues related with this management.
The other thing is leave it like that and do nothing, but sincerely I don't know what to do.
Do you have any suggestion on this issue? What can be done in this situation?

EE2 - bypass a login with a unique URL?

I have a weird problem - I'm working on a portfolio site built in Expression Engine that has a number of clients who all obviously need to log in to access their portfolio.
I've been asked to see if there's a way that a user could login once, and then somehow, from then on, be able to bypass the login screen when they return to the site - the main client is keen on a unique URL, and I can't see how this would be done. I'm a bit of a novice with Expression Engine, so if anyone has any tips I'd love to hear them!
Cheers in advance.
You would need to build an add-on with a module and extension to do this. Many steps involved, but doable.
create a new table to hold some sort of unique ID, a member_id, and probably an expiry date
insert a new action when your module is installed, and have a corresponding method which will handle logins in your module
use the member_member_login_start extension hook to insert a new row into this table, and then to generate an email which is sent to the member's email address which contains an action URL built using the unique value you just inserted (e.g., http:/mysite.com/?ACT=XX&unique_id=XXXXXX)
Something like that.

User Fast Switching Ideas Needed

I'm looking for ideas on how to implement some type of fast login scenario for an application that will allow employees to quickly login.
I work with an organization that has employees rotate every 30 minutes to a different location. If there are 3 employees, then the first employee won't come back to the checkout station for an hour. The checkout station is a higher traffic area where different things are borrowed by customers. Right now they have a generic login, but the organization wants to track which employee checked out/in a borrowed item. The problem is when they rotate there are customers there many times and having them logoff and login either via a workstation login or an application login is too slow for customer service.
Any suggestions?
I think a fingerprint reader would work well for logging in users. Then, they wouldn't have to type anything to log in.
There are plenty of biometric SDKs online that should be able to help you with this. And, I think some commercial readers will do something similar already, so you wouldn't even need to write any code.
Here's an article on Microsoft's Upgraded Fingerprint Reader
Also, you can have them scan once to log in, and once they are logged in, they can scan again to get logged completely out of the system (instead of just locking the screen or forgetting to log out and walk away.)
Use an application-level login, but make it only based on typing in their employee ID. This will simply identify who they are, exchanging security for speed while not giving up identity. Using employee ID's for this is a good way of guaranteeing uniqueness. I've seen systems like this work in retail, and it's really fast. Employees get used to typing this number into the console.
I'm not sure if it's in your budget but this sounds like a good use for those little button 1-wire devices. Basically it's an electronic "key" that is about the size of a button and can be read very quickly.
So Employee A goes to the station, puts his button on the pad(takes like 2 seconds) and he's logged in. When he needs to leave he pushes one button to log out, then employee B can come and log in, etc etc.
a picture of the button: