How to get the current user's role in a custom rally app in production? - rally

So, I am able to do this fine when testing my custom app in the debug environment provided by rally-app-builder. I use Rally.environment.getContext().getUser() to get the current user, and from the returned object I get the role from the "Role" field. But, for some weird reason, when I use the exact same code in Rally production, Rally.environment.getContext().getUser() returns a different object that has no "Role" field. What is the solution for this problem? thanks.

:sad trombone:
This is a defect for sure. The context object is populated a little differently between the external App SDK bootstrapper and the way it is created when running within the product.
I'm going to file a defect and get this resolved ASAP. I'll post back here once the fix has been released. Can you work around it for now?

Related

Mac App Sandboxing- Updating files outside the sandbox

I have an Application for the Mac that I want to publish on in the app store.
I order to get it published I need to put in a sandbox.
The app access Sqlite files outside the sandbox which the user selects from a openpanel.
The App works fine when is performs a select but it fails on inserts and updates.
I can remember reading something about some function you could call that could give you write access to files outside the sandbox but for the life I can remember what is was Can anyone enlighten me ?
Regards Christian Arild Stœr Andersen
Add "com.apple.security.files.bookmarks.app-scope" with boolean value YES in entitlement file of your project. Add follow "With Sandboxing" section of this link --
http://cocoaintheshell.com/2012/09/saving-sandboxing/
When you resolve your URL, by using URLByResolvingBookmarkData: method, you will get the url something like this --
file://localhost/Users/XYZ/Downloads/MyAudio.mp3?applesecurityscope=353734653735396237656239646134396537363331633063393765356234363035353666326332393b30303030303030303b3030303034534534343030303032303b636f6d2e6170706c652e6170702d73616e64626f782e726561642d77726974653b30303030303030313b30313030303030323b303030303030303030303035633134613b2f75736572732f69706874656368322f646f776e6c6f616473
For more information search for -- "NSURLBookmarkCreationWithSecurityScope"

Adding licence field to WSO2 API in API manager

I have the need to add a licence field to the APIs published by the API manager.
It does not seems to be any extension point beyond the api.rxt file in the resource folder.
If I modify the file and run the application the carbon app correctly show the added field, but nor the publishe nor the store are able to get the field and there is no way to get it also with REST APIs since it calls a method of a class that (in later versions) outputted fields positionally.
Is it possible to add the field, without running the risk of crashing the API Manager?
Which is the correct way?
Thanks
This change cannot be done without modifying the code. When an API is created from the Publisher app, it gets stored in the registry. The api.txt you modified, only defines the structure of this stored artifact. It may add a new field to the artifact, but to correctly populate that field, you need to modify several methods in APIProviderHostObject and APIProviderImpl + several Jaggery scripts.

Youtrack Custom field for who raised Issue?

I was expecting this to be a simple thing, but I am not quite sure how to go about doing it.
Basically on the current project we are trialling YouTrack and the agile board is great, but they could do with knowing who raised certain issues in case they need to go question them further on the issue. However I cannot seem to find a simple way to display this information.
I presumed it would be a custom field of type user, but it appears that this would manually need filling in and would not just be able to be pre-populated by the user who is making the task.
So is this possible?
Currently you can view only the assigned user's name on a ticket in Agile board.
I've created a task based on your request http://youtrack.jetbrains.com/issue/JT-19118, you are welcome to vote and leave comments.
As a rough workaround, you can configure notifications on created issues in your projects.
In this way, developers will be notified about all created issues and their reporters.
For that, create a saved search (i.e created by: {Testers}), make this search visible to needed group (by clicking "Edit" on the saved search) and enable notification "on issue created" in user's "Profile". Also, user with admin permissions is able to allow this notifications for all needed users by himself(navigate to "Administration" area -> "Users" -> {user} ->"Profile").
Note, that you can receive notifications both via email and jabber.
Thank you.

Windows 8 store package fails on WACK when login to developer account

I'm trying to put a simple app on windows store. I made a fail attempt once, I submitted an app which failed to pass WACK, eventually it failed on submission too. Even then, when I try to package an app with my developer account logged in, I get a performance launch error.
Even on a blank app. also right after I create package logged in, my app's package name and provider fields on appmanifest are changes too. app's package name changes to the first app I submitted, and the provider changes to I guess my developer account's key.
I deleted my failed submission on dashboard, deleted all the names I reserved, including the failed one. But even when I reserve a new name and package my app with that name, my package name still changes to the very first one and fails on wack.
BUT, when I create package of my app WITHOUT logging in, I mean without associate with windows store, I can package my app with the name I want and pass the WACK. I hope anyone can help me with this.
Edit: C# application.
I had this happen too, it seems like WACK got confused and kept trying to verify the wrong version. The following steps resolved it for me:
Uninstall the app from your development PC (as in, go to start page,
right click on the app and select uninstall).
Reboot the dev PC.
Select "Local Machine" and "Release".
Start debugging wait for it to
have started up completely and then stop debugging.
Pretty sure that only one or two of those steps are actually needed, but not sure which ones.
I'm not completely sure I understand your issue, but let me try...
First, what is the failure that you got when you submitted to the Store and when you ran the WACK? You mentioned a "performance launch error". If you are failing the performance test, check out this article for tips to help. Some examples:
Package content locally (or cache it) when possible, so you don’t have to pull resources from a network during launch.
Load and do only what you need on launch. You can load other data and do other work asynchronously in the background or when you actually need it.
Use a "dirty bit" when saving data on suspend, so you only save data that has changed. (Rather than re-serializing your app’s state if that data hasn’t changed, create a Boolean flag variable (or “dirty bit”) which signals that your data has been modified, and only re-serialize when the data has changed.)
Use bytecode caching if you are developing in JavaScript, so each JS file has bytecode created once and not every time the app launches. To enable this, make sure all JavaScript files are UTF8 encoded with a byte-order mark (BOM) and are statically referenced in the root of your HTML start page.
If this is not the error that the WACK and your Store certification is failing with, please see this blog post and the related blog posts that it links to, to see if your failure is covered there.
Secondly, your issue with associating your code with your reserved name in the Windows Store:
also right after I create package logged in, my app's package name and
provider fields on appmanifest are changes too.
This behavior is expected. When you associate your app package with the Windows Store, it will change the "Package name" and the publisher in your appxmanifest. But that's okay! The "Package name" is just what the Windows Store uses as an internal identifier for your app package, and the "Package display name" (right below it in the appxmanifest) is what your end users will see. Set the "Package display name" to what you want.

Jira SOAP API custom field

Hi I'm am trying to get the list of issues from a JIRA server using the SOAP API provided by JIRA.
I'm trying to filter the issues based on a custom field (and latter I will want to set that custom field).
If I get the list of issue it returns the custom fields for those issues along with them (I get customfieldId, key, values for each custom field) and I can get the custom field with getCustomFields methods provided by the API (to look for the ID of the field with a given name).
The issue I have is that if I login with an account that is not an admin (using the API) I can't call the getCustomFields method (it throws an exception saying I have to be an admin to do that).
My question is: Is there any other way to know which is the ID of the custom field I desire that can be done using a normal user account?
Also if you know how to set a custom field for an issue, it would also be very helpful :) (I would also like to be able to do it with a regular user account).
You have to be an admin to get a list of custom fields. Any 'normal' account can act on the custom fields via the API provided the user knows the customfield ID.
You can set the value of a custom field too, even with a 'normal' account. Again, the user needs the appropriate permissions to do this. Example provided here.
More here and here.
You can also use getFieldsForEdit(token, issueKey), which will return RemoteField[] for all fields available for edit on that issue (even if it has not yet been defined on the issue). It does not require admin permissions, but because it has the word "Edit" in the method, it does require that you have permission to edit the issue (which means, e.g., if the issue is status=Closed, it will raise an exception unless you allow editing closed issues. Unfortunately, I have yet to find a way to retrieve the RemoteField[] list (in order to map id to name), so getCustomFields() and getFieldsForEdit() appear to be the only options.
Have you tried getting a list of issues from the project, picking one, zeroing out the data, and using that as a template? That might work.
SOAP is being deprecated in favor of the REST API, which also has a better method to get this information