Youtrack Workflow - Notify a group in a workflow - youtrack

I am trying to create a workflow for my project in Youtrack that will notify all members of a UserGroup when the state is set to an appropriate value - for example notify all members of the QA group when a task is set to Ready For QA.
Here is the code I have, taken from a larger state machine workflow:
on Approve do {
{group: Quality Assurance}.notifyAllUsers("Task Ready for QA", "A task has been marked as Ready For QA: " + getId());
Alpha Tested By = loggedInUser;
} transit to Ready For QA
Setting the Alpha Tested By values works, everything else works but the group notify. In the editor, the group notify line is highlighted in red, but there is no information about what the problem is. The group name is correct. I copied the syntax directly from the documentation here: https://www.jetbrains.com/help/youtrack/incloud/7.0/Workflow-Language-Grammar.html#literals
I am using the v7.0 InCloud hosted version of YouTrack.

I guess you use the "YouTrack Workflow Editor". Inserting is a bit nasty, copy-paste usually won't work.
Just navigate your mouse to the position you want to insert and hit ctrl + space (autocomplete). Start typing "{group" and you'll get the suggestion for {group: }.
Use again ctrl + space to get the right group-name. After group add the dot "." and once again ctrl + space to add the notifyAllUsers function.
This is my workflow which added issues moved to state "QA" onto a agile board for QA and sends notification to all users in group QA:
whenState.becomes({QA}) {
sprints.add({QA Board.First sprint});
{group:QA}.notifyAllUsers("New Task in QA: " + getId( ) + " " + summary, "Please check your QA board or open this task: " + getUrl( ));
}

Related

How to send message to all players on server? (Server-side)

How would I send a message to all of the players on the server? (When trying to do so, it only outputs to the console, and I believe that is because the mod is not installed on the client side.)
I have been trying to make a mod for a 1.7.10 server (To put in a 1.7.10 mod pack) that can message all of the players online. I have looked this question up, and have not found any answers.
#SideOnly(Side.SERVER)
#SubscribeEvent
public void onDeath(PlayerEvent.Clone event)
{
if (event.wasDeath) {
final String[] messages = {"Oh boiss we got a respawner O_O", "How dare ye respawn on me?", "GAAH! You died again!", "._. Just why...", "Was taht me or waas that you? -.-","Why isn't this in hardcore mode? It should be..."};
Random random = new Random();
int index = random.nextInt(messages.length);
ChatComponentText text = new ChatComponentText(messages[index]);
ChatStyle style = new ChatStyle();
style.setColor(EnumChatFormatting.LIGHT_PURPLE);
text.setChatStyle(style);
FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().sendChatMsg(text);
System.out.println("Respawned");
}
}
I expect that the server will send a message to all, but only outputs to the console.
A really quick way this could be handled is to create an EventHandler for when a player joins. Then add them to an ArrayList. Then when they leave (Check for kick / quit event). Remove them from the ArrayList. By having an arraylist you can run through this and message every player.
Your 'System.out.println("Respawned");` line will only print to the console.
I believe what you are looking to do is the following:
1) Loop through all the players on the server.
2) Send each player the calculated message.
I'm not 100% sure how to access the player-list off the top of my head, but you need to access the FMLServerHandler and get the player-list, OR (the better way) access the EntityPlayer objects connected to the player's current world and do the above steps. The second method would only work for the current world, so if you wanted to access all the connections to the server, the first method is the way to go.

Take a snapshot of program after every test

I have a test setup that opens a program and does a test on loop.
I want to have the program take a snapshot / screenshot of the program (only) after a test, inside the loop.
Is this possible?
Below is my test suite run:
So it is fine, and I can run through the full test, but I can't see the results, unless I have Ranorex open. This is not sufficient, if I run this on another PC or VM.
NOTE: All the blanked out boxes, are my variables.
To take a screenshot of the app under test, 3 simple steps:
Create a repo item of the application (using Ranorex Spy).
Drag n Drop the repo item in a recording.
Select the "Capture Screenshot" action.
Hope this helps (even though you have solved the issue!)
Just for clarification.
Ranorex Support team helped me by giving me some C# code to help save screenshots to a location on my PC.
Add a Code Module to the Action Screen, then add the following code:
public void SaveScreenshot(string savelocation)
{
//Take a screenshot of a specific element
Bitmap image = Imaging.CaptureImageAuto(repo.program.SSTabCtlWndClass);
//Name and path to store the screenshot
String imageName = String.Format(varNumber1 + "_" + varNumber2 + ".jpg");
String pathImageName = Path.Combine(#"C:\temp\Screenshots\", imageName);
//Save the screenhot in your specific folder
image.Save(pathImageName, System.Drawing.Imaging.ImageFormat.Jpeg);
}

Dynamics CRM 365 - Invalid User Authorization The user authentication passed to the platform is not valid

Whenever I click on an opportunity to customize it
The window bellow opens
It appears that the customization window is trying to open an activity window and it should open a opportunity chart window. The only error displayed is "Invalid User Authorization The user authentication passed to the platform is not valid" and there are no errors in the debug window.
Note:
Opportunity Charts are the only charts with this problem. If I try and customize a company chart the problem does not occur.
Publishing a chart from XRMToolbox works. It is only in the customization window that the problem occurs.
In the production version of my site, the problem does not occur.
I have tried clearing my browsers cache as suggested here.
---UPDATE 1---
In response to #ConorGallagher
Is it any of the opportunity charts or just particular ones?
It is ALL opportunity charts. NONE of them will open.
Have you tried opening up developer tools and checking network to see what exactly is failing?
I have and the developer tools do not reveal any errors.
Customization page:
Chart page:
Or using fiddler do analyse it and find out what exactly is failing?
This is all I get from fiddler when I click on a chart:
Are there any encryption settings that differ between production and dev?
Encryption settings are the same between the two.
Is the dev organization a database copy of production or a new install?
Dev organization is a copy of the production that was working prior to in place upgrade.
Does it happen when you're logged directly onto the server and try customizing charts?
It happens on PC and directly on server.
---Update 2---
In response to #ConorGallagher
I'd have expected a 401 (or some http error) someplace on the network tab in developer tools. Can you double check that tab just to see.
I would have also but everything in the network tab is a 200. Except the first one is a 302. See fiddler output bellow v.
In response to #Pawel Gradecki
1) You should not check Developer Tools for script errors, switch the tab to "Network" and check for any HTTP errors there.
See above snapshoot to #ConorGallagher of my network window ^.
Also you did not enable HTTPS decryption on fiddler, so your log is not very meaningful, you should enable this first and then recheck fiddler
My apologies here is the fiddler output with decryption enabled:
This is much more helpful. The page appears to not be able to find the source map (404) and then redirects to the error page (302). I'm not sure though if it redirects because it can't find the source map or because of some other error.
2) Check server Trace logs, they can show some additional info that can be used for troubleshooting
https://raw.githubusercontent.com/MasterProgrammer200/stackoverflow/master/crm/log-opportunity-user-auth.txt
4) Can you open some working chart designer (for example for account) and copy the full URL and paste it to a separate window. Do the same with Opportunity chart (copy and paste it to separate window). If it's still not working for Opportunity compare both URLs, try to play with them a little (exchange some query string parameters).
I played with the url
https://crmcanada-dev.url.com/main.aspx?appSolutionId=%7bFD140AAF-4DF4-11DD-BD17-0019B9312238%7d&extraqs=etc%3d1%26id%3d%7bA3A9EE47-5093-DE11-97D4-00155DA3B01E%7d&pagetype=vizdesigner#665349499
Now if I change the url to:
https://crmcanada-dev.url.com/main.aspx?appSolutionId=%7bFD140AAF-4DF4-11DD-BD17-0019B9312238%7d&extraqs=etc%3d3%26id%3d%7bA3A9EE47-5093-DE11-97D4-00155DA3B01E%7d&pagetype=vizdesigner#665349499
(Since 1 is the Company object and 3 is the opportunity object). I still get redirected to the invalid user page.
Remember to check very carefully server Trace, because it can tell you something meaningful. If you will have something there, paste it here so we can also have a look at it.
See above link ^.
One more idea that came into my mind - try to backup your organization database, restore it under different name, import it under different name (so you should have a separate organization on DEV). Sometimes there are errors during organization import that do not stop the import itself, but cause some strange behaviour of the CRM. Check if this re-imported organization has the same problem.
This would be a last resort.
After a week of pleading and sacrificing burnt offerings to the programming gods (aka Microsoft support) we were finally able to figure out what the problem was.
The problem was that prior to the upgrade from CRM 2016 to CRM 365 we had removed a managed solution but for some reason one of the fields in the view didn't go with it. When we upgraded to 365 the unremoved field caused an error. Upon investigation we found a exclamation mark in a circle next to the problematic field in the view creator.
To fix the problem we went through every view and removed the troublesome field which for us was new_opportunitytype. Then we used the bellow query to scan the CRM database for occurrences of new_opportunitytype and had to remove it from a form by editing the xml in the SystemFormBase table
In short, hide yo kids, hide yo wife, check yo views, but most of all Microsoft needs better error handling.
Helpful query from Microsoft Support:
/*This query searches the entire CRM database for the specified string*/
declare #TableName char(256)
declare #ColumnName char(256)
declare #FindString char(256)
declare #sql char(8000)
/*Replace X with character(s) you which to find and Y with its replacement*/
set #FindString = '[enter a guid or string or something]'
/*select o.name, c.name from syscolumns c inner join sysobjects o
on o.id = c.id
where o.xtype = 'U'*/
declare T_cursor cursor for
select o.name, c.name from sysobjects o inner join syscolumns c
on o.id = c.id
where o.xtype = 'U' and c.xtype in (175,239,99,231,35,167)
open T_cursor
fetch next from T_cursor into #TableName, #ColumnName
while (##fetch_status <> -1)
begin
set #sql = 'if exists (select * from ' + rtrim(#TableName) + ' where ' + rtrim(#ColumnName) + ' like ''%' + rtrim(#FindString) + '%'')
begin
print ''Table = ' + rtrim(#TableName) + ' Column = ' + rtrim(#ColumnName) + '''
end'
exec(#sql)
fetch next from T_cursor into #TableName, #ColumnName
end
close T_cursor
deallocate T_cursor

Automatic download of created file in Sencha Touch 2

My Sencha Touch 2 application has an 'Export' button, which creates an Excel file with the data of the selected offer.
After the user clicks the button, i want the (server side) export process to be started, and, once completed, the user to be prompted to select a filename and location, OR that the file is automatically downloaded. How do i do that? Does anyone have an example?
For Excel specifically I'm not 100% sure, but this might help you get started or if a CSV is acceptable...
I'm sure you could pass the file reference to a var instead of the string but I have yet to try it.
If you paste the js below into the console you can see how this works. Pretty basic. Maybe try the returned value from the server to see if that works then if it does you can build a function around it to happen when needed.
csvHeading = 'HA, HB, HC, HD \n';
csvData = 'r3a, r3b, r3c, r3d \n' +
'r2a, r2b, r2c, r2d';
CSVFile = csvHeading + csvData;
window.location = 'data:text/csv;charset=utf8,' + encodeURIComponent(CSVFile);

Live Tile Notification Not Showing

Hi I've been working at this for a while without success. I'm trying to send a simple notification to the live tile for my Native Windows 8 game. To get used to it I tried to use the example mentioned in the docs:
var expiryTime;
expiryTime = date_current_datetime();
expiryTime = date_inc_minute(expiryTime, 5);
win8_livetile_notification_begin("TileSquarePeekImageAndText01");
win8_livetile_notification_expiry(expiryTime);
win8_livetile_notification_tag("tag0");
win8_livetile_notification_text_add("Current Score = " + score);
win8_livetile_notification_image_add("ms-appx:///" + working_directory + "ScoreTile.png");
win8_livetile_notification_end();
Now this code crashes my app. Can someone tell me how to post a tile notification and where we should put the images. Right now I have the images inside of the Included Files folder.
score is a real value, not a string, so you must write:
win8_livetile_notification_text_add("Current Score = " + string(score));
There's no typecasting in GameMaker and never was.