Agile Central Basic App Settings - rally

I'm implementing a simple app based on the UserIterationCapacity using a Rally.app.TimeboxScopedApp.
Now I want to specify a couple of settings as App settings and found the developer tutorial for this: https://help.rallydev.com/apps/2.1/doc/#!/guide/settings
But I just cant get it working. Whenever I try to fetch a setting my code stops without any warnings.
I've implemented the following:
config: {
defaultSettings: {
hoursPerSp: 6,
decimalsOnHoursPerSp: 1
}
},
getSettingsFields: function() {
return [
{
name: 'hoursPerSp',
xtype: 'rallynumberfield'
},
{
name: 'decimalsOnHoursPerSp',
xtype: 'rallynumberfield'
}
];
},
Now I'm trying to use
this.getSettings('hoursPerSp');
but unfortunately it is not working.
Thank you in advance

Problem solved.
I needed to keep track of my scope, i.e., I needed to pass in the this variable to my renders.

Related

How to send data to Segment from a Vue/Nuxt app?

I'm trying to connect to a Segment source from a Vue/Nuxt application. I'm using the #dansmaculotte/nuxt-segment npm package for Segment setup.
Here's the code:
nuxt.config.js
config = {
//...
modules: [
'#dansmaculotte/nuxt-segment'
],
segment: {
writeKey: 'SEGMENT_WRITE_KEY',
disabled: false,
useRouter: true
},
//...
}
component.vue
this.$segment.identify('***', {
name: '***',
email: '**#**.com'
});
this.$segment.track('***', { plan: '***' });
this.$segment.page('***');
Segment setup:
On the deployed app, Segment is being initialised and does make tracking calls successfully.
But with all that, the data does not come through on Segment. I didn't get any errors that can tell me what's wrong. Not sure what the problem is. Thanks in advance for whoever might be able to help.

I'm switching from Vuex to Pinia in Vue 3 and my unit tests are now failing. I can't seem to be able to create custom mock actions

Here's a simple example on the forgot password reset page of my app, I would want to bypass the server side and just have the password reset to succeed on click so I would write a test and use the custom test store like so:
const customStore = {
state() {
return {
Authentication: {
passwordResetSuccess: false,
},
};
},
mutations: {
SET_RESET_PASSWORD_SUCCESS(state) {
state.Authentication.passwordResetSuccess = true;
},
},
actions: {
forgotPasswordResetPassword() {
this.commit('SET_RESET_PASSWORD_SUCCESS');
},
},
};
Then I could include the custom store in my beforeEach() and it worked great. I've tried everything I can think of to get this to work with pinia, but it doesn't seem to work.
I'm using jest along with vue/test-utils.
I basically tried just creating the test pinia store, but I can't figure out how to get the component to use the custom test store.
const useCustomStore = defineStore('AuthenticationStore', {
state: () => ({
passwordResetSuccess: false,
}),
actions: {
forgotPasswordResetPassword() {
this.passwordResetSuccess = true;
},
},
});
const authenticationStore = useCustomStore();
I can't directly add it as a plugin because it can't find an active instance of pinia.
I went through this guide: https://pinia.vuejs.org/cookbook/testing.html#unit-testing-a-store
and I also tried using jest mock as described here: https://stackoverflow.com/a/71407557/4697639
But it still failed.
If anyone has any idea how to create a custom store that can be used by the component and actually hits the custom actions, I could really use some help figuring this out. Thank you!!
Tao mentioned in the comments that this isn't a good way to do unit tests. I will mark this as resolved and fix how I do the testing.

What are the available options for LayoutAnimation.Types

I have a custom layout animation taken from here.
var CustomLayoutAnimation = {
duration: 200,
create: {
type: LayoutAnimation.Types.linear,
property: LayoutAnimation.Properties.opacity,
},
update: {
type: LayoutAnimation.Types.curveEaseInEaseOut,
},
};
When running the code i get the following warning
Warning: Failed config type: The config config.update.type is marked
as required in LayoutAnimation.configureNext, but its value is
undefined.
The code has an entry for update.type, yet the warning says it's undefined. I'm guessing that the permitted values have been updated since the gist was written.
I tried to find out the list of available permitted entries but they are not listed in the React Native LayoutAnimation documentation.
I'd like to know :
Is the syntax no longer correct?
Is there a webpage somewhere that details the list of availble Types?
Whenever I run into an issue like this, I go to the source code. Here's the file for LayoutAnimation.js from the react-native source code. Based on this, I see a TypesEnum const declaration at line 25 looking like this:
const TypesEnum = {
spring: true,
linear: true,
easeInEaseOut: true,
easeIn: true,
easeOut: true,
keyboard: true,
};
I suspect that's why you are erring out - curveEaseInEaseOut is not a supported type. Choose one from the list above and I think you should be good to go. Hope this helps!

ExtJS 4 prbolem with using business logic in the controller when it's triggerd from the view

I have a view designed like that:
Ext.define('MY.view.NotificationMails', {
extend: 'Ext.grid.Panel',
alias: 'widget.NotificationMailsPanel',
id: 'id-notification-mails-panel',
and I have controller for this view which is:
Ext.define('MY.controller.NotificationMailsController', {
extend: 'Ext.app.Controller',
models: [
'NotificationMailsRecord'
],
stores: [
'NotificationMailsStore'
],
views: [
'NotificationMails'
],
// refs:[{
// ref: 'notificationMails',
// selector: 'mailGrid'
// }],
init: function() {
this.control({
'#id-notification-mails-panel': {
itemclick: this.clickedSomething
}
})
},
and just to make some test and eventually find the problem a simple function definition for itemclick :
clickedSomething: function() {
console.log('Deteceted click');
}
But nothing happens. I tried many variations and still can't get my actions from the view to execute functions in the controller.
The curios thing is that I have several controllers and in most of them everything works as expected but this one and few others - I don't know - maybe I do something wrong, maybe the reason is somewhere else.
thanks
Leron
,
This is weird. I'd try the following: console.log within init() to see if the controller is initialized (you might have forgotten to include it in your app list of controllers).

Sencha touch 2.0 : Store loading, first availability

I'm trying to figure out when a store is ready to be used within my app.
I figured from the doc that if I want to display information from my store, I should listen to the 'refresh' event of my store to get notified when it has been changed (and thus also when it is first loaded).
However, using the following example:
Ext.define('MyApp.store.Config', {
extend: 'Ext.data.Store',
config: {
autoLoad: true,
autoSync: true,
model: 'MyApp.model.Config',
listeners: {
refresh: function() {
console.log(Ext.StoreManager.get('Config').getAt(0))
}
}
} });
the 'console.log' gets called twice at startup, and it fails the first time (it seems that the Store is not loaded yet). My model uses a proxy (type ajax, and a json reader).
Could someone tell me how I should proceed to avoid this error?
Thanks!
I found the reason...
I was declaring the 'stores:['Config']' property both in my app.js and in on of my controllers.
Quite hard to spot but my mistake...